in reply to How to name arrays via scalars.
Why it's stupid to `use a variable as a variable name'
Update:
c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "use warnings; use strict; ;; my $foo = 'bar'; ;; my %data; push @{ $data{$foo} }, qw(zero one two three); dd \%data; ;; print qq{'$data{$foo}[1]'}; " { bar => ["zero", "one", "two", "three"] } 'one'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to name arrays via scalars.
by qingdaoghawk (Initiate) on May 03, 2014 at 11:49 UTC |