my $variable = "current value"; while ( whatever() ) { ... my $variable = "new value"; # if "my" was just typed by habit here ... } print $variable; # then there's probably a bug when we get here