in reply to system "no_such_file" returns a different error on Fedora
Hm, that looks like a bad test to me.
$rc = system { "lskdfj" } "lskdfj"; unless( ok($rc == 255 << 8 or $rc == -1 or $rc == 256 or $rc == 512) ) + { print "# \$rc == $rc\n"; } unless ( ok( $! == 2 or $! =~ /\bno\b.*\bfile/i or $! == 13 or $! =~ /permission denied/i or $! == 22 or $! =~ /invalid argument/i ) ) { printf "# \$! eq %d, '%s'\n", $!, $!; }
By the time something gets around to checking $!, won't all of the system calls performed by ok() and print have set it to something else?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: system "no_such_file" returns a different error on Fedora
by amir_e_a (Hermit) on Jul 03, 2008 at 17:47 UTC |