"You cannot insert a conditional statemenent in an such a construction."
I beg to differ!
use strict; use warnings; print <<"END" for 1..100; @{[$_%3?():"Fizz",$_%5?():"Buzz",$_%5&&$_%3?$_:()]} END
For simpler examples, it's even possible to make it sort of legible!
use strict; use warnings; print <<"END" for 1..100; @{[ ($_ % 2) ? 'Odd' : 'Even' ]} END
In reply to Re^2: a perl code syntax help
by tobyink
in thread a perl code syntax help
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |