in reply to Perl File-Test Operators
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 $!.
|
|---|