Perl: the Markov chain saw | |
PerlMonks |
Variable fails where absolute path does notby DSMcL (Initiate) |
on May 14, 2009 at 05:42 UTC ( [id://764003]=perlquestion: print w/replies, xml ) | Need Help?? |
DSMcL has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a script to automatically extract archives. After extracting, I am able to get the path to the file from unrar.exe and am using the -e test to be sure the file exists on the hard disk. The filename and path are being passed via a variable here:
The following is the file and path I was using to test: "0794515576\The Usborne Complete Book of the Human Body_0794515576.pdf"The variable $file contains exactly what is above and the file exists but the test fails and the program dies. If I substitute the path and file name listed above in place of the variable containing the same information, the test passes and the script continues normally. I am using the script on win32. I have tried using the full path including drive letter with no better luck. I have been unable to figure out how to get the variable to work. Any help would be greatly appreciated!Thank you
Back to
Seekers of Perl Wisdom
|
|