in reply to File testing via list of test operators
You have a bug in your script on line 14. The file test operator is the key of your hash, not the value. You also need to quote your filename.
Your code should read:
foreach my $t (keys %tests) { if ( eval("$t '$myfile'") ) ...
I tried out running file tests like that in the perl debugger, and the worked fine, once everything is quoted correctly.
|
|---|