U
usenet
Kindly consider this simplified script which illustrates my question
(and, no, I'm not REALLY using such poorly named keys - this is just
for illustration):
#!/usr/bin/perl
use strict; use warnings;
use Data:umper; $Data:umper::Indent = 1;
my %chart;
$chart{'left'}{'row_1'}{'col_1'}{'status'} = 'active';
$chart{'left'}{'row_1'}{'col_1'}{'type'} = 'regular';
$chart{'right'} = %{$chart{'left'}}; # [ <<< Problem here! ]
print Dumper(\%chart);
__END__
As you can probably infer, my intent was to create another structure
($chart{'right'}) which duplicates what I have defined in
$chart{'left'}. But I'm not getting the syntax correct (and I've tried
a few variants without success).
Can someone tell me what the proper syntax would be?
Thanks!
(and, no, I'm not REALLY using such poorly named keys - this is just
for illustration):
#!/usr/bin/perl
use strict; use warnings;
use Data:umper; $Data:umper::Indent = 1;
my %chart;
$chart{'left'}{'row_1'}{'col_1'}{'status'} = 'active';
$chart{'left'}{'row_1'}{'col_1'}{'type'} = 'regular';
$chart{'right'} = %{$chart{'left'}}; # [ <<< Problem here! ]
print Dumper(\%chart);
__END__
As you can probably infer, my intent was to create another structure
($chart{'right'}) which duplicates what I have defined in
$chart{'left'}. But I'm not getting the syntax correct (and I've tried
a few variants without success).
Can someone tell me what the proper syntax would be?
Thanks!