Ron Mitchell wrote:
: I want to check that a backtick command has executed OK. I thought I could
: do that by looking at the $! variable.
Check $? instead. This one's for pipes, backticks, & system() commands.
It's a fairly complex flag, with a lot of stuff in it, but briefly,
$? >> 8 contains the exit value of the subprocess.
So your code might look like:
$output = `pwd` ;
print "$output\n" ;
$status = $? >> 8;
print "\$status = $status\n" ;
As for always getting that weird error message from $!, I always
get "Illegal seek" on my machine.
-- tdk