my %hash = ( 1 => 'one' , 2 => 'two' , 3 => 'three' ); no strict; map { push @{ ++$i % 2 ? 'one' : 'two'}, $_ } %hash; print "@one\n"; print "@two\n";
Another one-line attempt. But maybe it should count as two...
In reply to Re: Simplifying for loop and applying multiple push function
by qq
in thread Simplifying for loop and applying multiple push function
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |