Keep It Simple, Stupid | |
PerlMonks |
Re: Do not run code even if one element has matched exit code valueby Marshall (Canon) |
on Mar 13, 2015 at 05:08 UTC ( [id://1119904]=note: print w/replies, xml ) | Need Help?? |
A list in Perl is pretty much like an array although there are some fine differences between these two concepts. I think your nomenclature {} vs () and description may not be the best. The {} does not describe an array or a "list". An "exit code" says to me that this is single integer value from returned to the O/S, not a multi-valued thing or data structure - an "exit code" is an integer in Windows or Unix. I think you mean to check the return array value from a subroutine? This code checks that the main program only got one returned value and that that single value is "3".
Update: well if the OP's intention is that should work for anything but 3, then the modifications should be obvious.
In Section
Seekers of Perl Wisdom
|
|