in reply to Handling weird return values with or die
@args = ("command", "arg1", "arg2"); system(@args) == 0 or die "system @args failed: $?"
Thanks, though... I've got it working now.
Just out of curiosity, is there some interesting piece of lore that explains why perl functions and shell functions have opposing standards for return values? The return values for other perl functions such as open, unlink, etc. as cited above seem to be the more intuitive, but I guess confusion only comes from having multiple standards.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Handling weird return values with or die
by Zaxo (Archbishop) on Jul 05, 2001 at 17:02 UTC | |
by mvaline (Friar) on Jul 05, 2001 at 17:15 UTC | |
|
Re: Handling weird return values with or die
by Abigail (Deacon) on Jul 05, 2001 at 19:57 UTC | |
by mvaline (Friar) on Jul 05, 2001 at 20:37 UTC | |
|
Re: Re: Handling weird return values with or die
by Excalibor (Pilgrim) on Jul 05, 2001 at 18:30 UTC |