sub foo { # changing $_ is not a good idea local $_ = $_; print "\$_ is currently: $_" } foo foreach qw(one two three four); __output__ $_ is currently: one $_ is currently: two $_ is currently: three $_ is currently: four