"The Dumper output i'm trying to achieve is..":
Has rightly pointed out by moritz, use Storable's freeze and thaw or dclone like so:
OR using dclone, in a single step... use Storable qw(thaw freeze); ... my $frozen = freeze \@a; for my $i ( 1 .. 2 ) { $h{"$i"} = thaw $frozen; } ...
The Dumper output will be what you are looking for.... use Storable qw(dclone); ... for my $i ( 1 .. 2 ) { $h{"$i"} = dclone \@a; } ...
In reply to Re: help with references
by 2teez
in thread help with references
by dw_perlmonks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |