You initialize $testdir to an empty string, and that is the value that goes to chdir unless there's a command-line option to select a specific path. Have you read what perldoc -f chdir says about using chdir with an empty string? Is that really something you want your script to do? (I think the result might vary according to what the OS and/or runtime environment happens to be.)
You might want to look at some modules like File::Spec and/or File::Basename, to make it easier for your code to handle path names in an OS-neutral way.
(updated to fix grammar)
In reply to Re: System call constantly dying
by graff
in thread System call constantly dying
by gokuraku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |