in reply to Re: Localizing hash keys in an AoH
in thread Localizing hash keys in an AoH
else local @data would initialize empty. (At least it does, in my tests).local @data = @data;
Update: this works:
Update 2: Just noticed kennethks solution below, that changes @data to a package (our) variable, and allows it to be localized.LOCAL_BLOCK_5: { local @data[0..$#data]; $_->{unit} = 'S' for @data; print Dumper \@data; }
"I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
-- Dr. Cox, Scrubs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Localizing hash keys in an AoH
by kennethk (Abbot) on Mar 15, 2013 at 22:18 UTC | |
by NetWallah (Canon) on Mar 16, 2013 at 03:11 UTC |