unnecessarily verbose. In the first example, you could achieve the same end with:
That's a syntax error:
$x=1; unless( $x ) or warn 'Erk!';; [syntax error at (eval 11) line 1, near ") or"
Remember that unless is a 'negative' if, and Perl doesn't support if without a block.
Ie. In perl, if( cond ) statement must be coded as if( cond ) { statement; }
In reply to Re^2: unless vs. bare block
by BrowserUk
in thread unless vs. bare block
by chayashida
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |