>perl -wMstrict -le "S(); S(); { my $s = 'hiya'; sub S { print $s++ } } S(); " 0 1 hiya >perl -wMstrict -le "S(); S(); BEGIN { my $s = 'hiya'; sub S { print $s++ } } S(); " hiya hiyb hiyc #### >perl -wMstrict -lE "S(); S(); sub S { state $s = 'hiya'; print $s++ } S(); " hiya hiyb hiyc