@stack=qw(d b f a e c 6); # <-- bottom .. top --> #### @stack=qw(f e d c b a 6); # <-- bottom .. top --> #### # You are not allowed to modify this. sub rotate_up { local($a,$b); $a=$_[0]; $a--; return if $a<1; $b=pop @stack; splice(@stack, -$a, 0, $b); }