c:\@Work\Perl\monks>perl -Mstrict -le "my @services = qw(BANG one two three STOP four five six); ;; my $side_effect = 'xxx'; $side_effect =~ /xxx/ if @ARGV; ;; func('STOP'); ;; func(); ;; sub func { my $done = shift; while (my $serv = pop @services) { printf qq{$serv }; last if $serv =~ /$done/i } print ''; } " six five four STOP three #### c:\@Work\Perl\monks>perl -Mstrict -le "my @services = qw(BANG one two three STOP four five six); ;; my $side_effect = 'xxx'; $side_effect =~ /xxx/ if @ARGV; ;; func('STOP'); ;; func(); ;; sub func { my $done = shift; while (my $serv = pop @services) { printf qq{$serv }; last if $serv =~ /$done/i } print ''; } " ARGUMENT six five four STOP three two one BANG