DSMcL has asked for the wisdom of the Perl Monks concerning the following question:
The filename and path are being passed via a variable here:
unless (-e $file) { die "$file did not extract properly"; }
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable fails where absolute path does not
by CountZero (Bishop) on May 14, 2009 at 05:56 UTC | |
by targetsmart (Curate) on May 14, 2009 at 08:41 UTC | |
|
Re: Variable fails where absolute path does not
by ysth (Canon) on May 14, 2009 at 06:16 UTC | |
|
Re: Variable fails where absolute path does not
by apl (Monsignor) on May 14, 2009 at 12:19 UTC | |
|
Re: Variable fails where absolute path does not
by DSMcL (Initiate) on May 14, 2009 at 06:28 UTC | |
by thiagu_mvt (Sexton) on May 14, 2009 at 06:57 UTC |