I suppose. But it doesn't seem much natural :) I only wondered why the teacher had to specify this strange requirement.{ my @ary = %hash; push @ary, $k => $v; %hash = @ary; }
Update: corrected bug in snippet, thanks to QM
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
In reply to Re^3: Filling a hash
by polettix
in thread Filling a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |