this one is shorter but also matches an empty stringperl -e '$_=shift;print(defined$_?$_:0)'
perl -e '$_=shift;print(/^$/?0:$_)'
In reply to Re: Stringifying undefs
by bageler
in thread Stringifying undefs
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |