At any cause @m will have only six elements in the array. so I have changed the code as follows :-
perl -e "$c=1;foreach $l(a..z){if($c==13||$c==1||$c==9||$c==5){push(@m,$l);}elsif($c==7){push(@m, $l);push(@m,$l);}$c++;}($b,$f,$h,$h,$j,$n )=@m;@m=();push(@m,$n,$b,$h,$h,$j,$f);print @m;"
perlmonks.org content © perlmonks.org and jesuashok, widdlepuke
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03