The only catch is that you can execute only one statement per iteration/condition with this syntax.
That's where do blocks come in handy :-)
knoppix@Microknoppix:~$ perl -E ' > $sayIt = 1; > do { > say q{Hello}; > say q{World}; > } if $sayIt;' Hello World knoppix@Microknoppix:~$
I hope this is of interest.
Cheers,
JohnGG
In reply to Re^5: list item comparison
by johngg
in thread list item comparison
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |