in reply to The -d switch isn't working as I expected it to (test to see if its a directory)
Since your chdir isn't going where you want, and the names don't have paths prepended to them, the '-d' test will fail. FWIW rather than chdir I usually just prepend the directory name to the paths. This is less error prone since you don't have to remember to chdir back to the previous directory.my ($startdir) = @_; chdir("$stardir\\") or die "Unable to enter dir $startdir:$!\n"; ^^^^^^^
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The -d switch isn't working as I expected it to (test to see if its a directory)
by sgifford (Prior) on Jan 07, 2005 at 21:40 UTC | |
by bluto (Curate) on Jan 07, 2005 at 23:08 UTC | |
by sgifford (Prior) on Jan 07, 2005 at 23:55 UTC | |
by bluto (Curate) on Jan 10, 2005 at 16:37 UTC |