for ( "read", "only", "value" ) { print "$_\n"; $_ = "test"; # blows up } #### sub foo { $_ = "test"; } foo(); # works for ( "read", "only", "value" ) { print "$_\n"; foo(); # blows up }