$ perl5120 -wE'my $x=1; given ($x) { $_ = 2 } say $x' 1 $ perl5120 -wE'my $x=1; for ($x) { $_ = 2 } say $x' 2
Edit: For some reason I wrote when rather than given above. Now fixed.
Dave.
In reply to Re: given == for?
by dave_the_m
in thread given == for?
by b4swine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |