You forgot to remove the trailing newlines from ls's output. IIRC, using warnings would have told you as much.
Warnings would also have told you you were trying to print undef, not 0, in which case you should have checked the error message in $!.
In reply to Re: Perl File-Test Operators
by ikegami
in thread Perl File-Test Operators
by gyasuda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |