c:\@Work\Perl\monks>perl -wMstrict -MData::Dumper -le
"my $index = q{1 => 'foo', 2 => 'bar', 3 => 'baz'};
my %hash = ( $index => 'foobar' );
print Dumper \%hash;
"
$VAR1 = {
'1 => \'foo\', 2 => \'bar\', 3 => \'baz\'' => 'foobar'
};
####
c:\@Work\Perl\monks>perl -wMstrict -MData::Dumper -le
"my $index = q{1 => 'foo', 2 => 'bar', 3 => 'baz'};
my %hash;
eval qq{ %hash = ($index); };
print Dumper \%hash;
"
$VAR1 = {
'1' => 'foo',
'3' => 'baz',
'2' => 'bar'
};
####
c:\@Work\Perl\monks>perl -wMstrict -MData::Dumper -le
"my $index = q{1 => 'foo', 2 => 'bar', 3 => 'baz'};
my %hash = eval qq{ ($index) };
print Dumper \%hash;
"
$VAR1 = {
'1' => 'foo',
'3' => 'baz',
'2' => 'bar'
};