There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It's not being caught in the compile phase. The program compiles just fine.
You are working just fine with eval ... it's system (specifically on Unix) that's tripping you up. Try doing: Unix commands are built off of the C libraries (for the most part). The standard C libraries, for reasons which will be left to your imagination, use '0' to indicate success and non-zero to indicate failure. Thus, the Unix commands tend to follow this (rather stupid) paradigm. In addition, system handles all the cleanup from failed commands. If you want to test $@, try Try them both - they exhibit different behaviors of eval and die. ------ Vote paco for President! In reply to Re: Eval and system()
by dragonchild
|
|