in reply to Re: File testing via list of test operators
in thread File testing via list of test operators
Perl now says ...foreach my $t (keys %tests) { my $cmd="$t '$myfile'"; print "running [$cmd]\n"; if ( eval{"$cmd"} )
So my script is a 0 byte file and also a > 0 byte file. Cool! :)running [-r './test.pl'] Passed [-r] test, ./test.pl is (is readable) running [-T './test.pl'] Passed [-T] test, ./test.pl is (type Text) running [-z './test.pl'] Passed [-z] test, ./test.pl is (is Zero bytes) running [-B './test.pl'] Passed [-B] test, ./test.pl is (is Binary) running [-s './test.pl'] Passed [-s] test, ./test.pl is (more than 0 bytes)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: File testing via list of test operators
by JavaFan (Canon) on Dec 21, 2010 at 14:48 UTC | |
|
Re^3: File testing via list of test operators
by ELISHEVA (Prior) on Dec 21, 2010 at 15:03 UTC |