Just a tiny question on the use of:
Is there a simpler way to just say "if val is blank then set it to a default value" without having to refer to the $val three times in the one line?$val = ($val ne '') ? $val : $default_val;
I know I can write a function (do we call them functions even tho the are 'Sub's?) - oops thats a second question! - but I was wondering what secrets Perl has that might do this.
Thanks,
___ /\__\ "What is the world coming to?" \/__/ www.wolispace.com
In reply to default values by wolis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |