in reply to foreach localizing variables
Spot the difference.use strict; use warnings; my $value = "four"; my @array = ( "one", "two", "three" ); foreach my $value (@array) { print "foreach value: $value\t"; function(); } sub function { print "function value: $value\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: foreach localizing variables
by educated_foo (Vicar) on Feb 07, 2008 at 17:35 UTC |