Also for :- > for my $step ( @steps ) { last if $STOP;
I would think the issue here is if the list is 30K long and we are still at 2K why would be really like to process whole list ? We can die or handle exit of the script gracefully in my understanding.