in reply to Reading return value from C program
You might find this thread insightful.
As for !$?, $? is a Perl special variable for child error. So if your script forks a child process and there is an error, this will contain that error. ! is the not operator. I'm guessing you're seeing something like:
if ( !$? ){ # do the stuff you do after a forked process completes sucessfully }
But that would be much easier to read as:
use English qw(no_match_vars); if ( not $CHILD_ERROR ){ # do the stuff you do after a forked process completes sucessfully }
Updated comments to reflect meaning of $?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading return value from C program
by ikegami (Patriarch) on Mar 15, 2007 at 18:00 UTC | |
by Anno (Deacon) on Mar 15, 2007 at 18:20 UTC | |
by ikegami (Patriarch) on Mar 15, 2007 at 19:08 UTC | |
by agianni (Hermit) on Mar 15, 2007 at 20:40 UTC |