@L=(0,map{push@C,lc=~/./g}<>}; ---- Results in ---- @L=(0,map{push@C,lc=~/./g}<>};sub p{$_=pop@n}sub w{push@n,@_}while($n<@C){$_=$C[$n++];if(/h/){p;w$n[-1-abs];$_>0&&splice@n,-2-$_,1}if(/n/){w 0;$b<0||w$b+7*p while($b=index"htaoinse",$C[$n++])<7}$0=p,p,w int$_/$0,$_%$0if/e/;$a=p,p&&($a?$n=$L[$a-1]:last)if/t/;/a/?w 1+grep$n>$_,@L:/o/?print chr p:/s/?w-(p)+p:/i/&&w ord getc||-1}