in reply to Re: Using system(): converting error num to human readable message
in thread Using system(): converting error num to human readable message
I read about the $? >> 8 in the Cookbook and I read the info about $! in a string context in perlvar http://perldoc.perl.org/perlvar.html#%24ERRNO, which is why I was trying to use those techniques.@cmd_arr = ("someprog", "var"); $msg = qx/@cmd_arr 2>&1/; if( $? ) { print "fail $?\n"; print "$msg\n"; } Result: fail -1 Use of uninitialized value in concatenation (.) or string at ./err_cvt +.pl line 17.
Cheers
Chris
PS any idea on Qn 3 ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using system(): converting error num to human readable message
by naikonta (Curate) on Apr 18, 2007 at 05:18 UTC |