foreach my $t (keys %tests) { my $cmd="$t '$myfile'"; print "running [$cmd]\n"; if ( eval{"$cmd"} ) #### 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)