You are also missing a couple of fundamental aspects of readdir. In order to get a file name readdir queries the file system and what returns is an actual file name with no newline or anything else added to it so using chomp is at best superfluous and at worst will damage the actual file name. And if you want to open a file with that name you have to remember that it is in $testdir and not the current directory like you seem to think it is.
In reply to Re: This is why Perl is so frustrating
by jwkrahn
in thread This is why Perl is so frustrating
by eggmatters
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |