use strict; use warnings; my @array = qw/a b c/; START: for my $item(@array) { my $sub_call = "&" . $item; eval ($sub_call); } sub quit { print "Would you like to do that again? 'y' or 'n'\n"; if ( =~ /y/) { goto START; }else{ print "OK, done.\n"; exit; } } sub a { print "Type 'blue' to continue:\n"; if ( =~ /blue/i) { return 1; } else { quit(); } } sub b { print "Cross your fingers and type 'foobar' to continue:\n"; if ( =~ /foobar/i) { return 1; } else { quit(); } } sub c { print "To quit (prematurely), type 'no'\n"; if ( =~ /no/) { exit; } else { goto START; } }