In one line with no pushing or cheating :)
@hash{ 'a'..'z' } = 1 .. 26;; 1 while ( $one[@one], $two[@two] ) = each %hash;; print "@one\n@two";; r a x d j y u k h g f t i e n v m s l c p q b z o 18 1 24 4 10 25 21 11 8 7 6 20 9 5 14 22 13 19 12 3 16 17 2 26 15
In reply to Re: Simplifying for loop and applying multiple push function
by BrowserUk
in thread Simplifying for loop and applying multiple push function
by jesuashok
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |