Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I guess that would not work, because the OP apparently wants to trigger the help function if any of the variables is absent, not if they are all missing. So using a hash, it would have to be something like this: help() if 22 > scalar values %params; # scalar unnecessary, just to make the context clearerBut that would not be very robust, for example if the %params may have some elements other that the list of mandatory parameters. So an approach more reliable than just counting the hash values would be to test each and every single mandatory param:
The exact test on the %params values would depend on how the hash is initialized. In reply to Re^2: checking values of variables
by Laurent_R
|
|