For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > January 2005 > $localfile pathname change causes error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author $localfile pathname change causes error
LilaDuncan

2005-01-23, 8:56 pm

Hi,
I installed the Windows version of ActivePerl on my "XP Home" computer.
PPM, some packages, including 'www.ebay-search' and most associated
Perl scripts seem to be running fine.

I'm new to any kind of programming and I'm trying to modify an example
Perl script that does an ebay search.
Line 4 of the script begins:
$localfile = "<pathname to search results file>";
Line 4 in the original example file reads:
$localfile = "/usr/localweb/ebayhacks/search.txt";
I modified this line by substituting the pathname to my own
'search.txt file:
$localfile = " C:\Perl\Scripts\ebay_searches\SearchResu
lts\Search.txt";

I'm now trying to understand the reasons why this causes an error.
I'm guessing that '$localfile' defines a preset part of the required
pathname, which is stored somewhere else in the program, leaving the
user to add the final part of the pathname.
Also, the original pathname (with forward slashes) seems to be
associated with a different OS, maybe Unix or Linux?

Can anyone please advise me, or point me to an info source where this
might be explained?

Attempting to run the script produced the following errors:

C:\Perl\Scripts\ebay_searches>perl -w ModExample.pl
Unrecognized escape \P passed through at ModExample.pl line 4.
Unrecognized escape \S passed through at ModExample.pl line 4.
Unrecognized escape \S passed through at ModExample.pl line 4.
Unrecognized escape \S passed through at ModExample.pl line 4.
readline() on closed filehandle INFILE at ModExample.pl line 21.
The system cannot find the path specified.

TIA

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com