Jamie Smyth <> wrote:
> I have a hash defined as,
>
> my %data = (
> 'wn_l' => $wn_l, 'wn_u' => $wn_u, 'wn_d' => $wn_d,
> 'npts' => $#spc+1, 'spc' => [@spc], 'label' => $label,
> );
>
> and I would like to extract the data in the @spc array.
Apply "Use Rule 1" from:
perldoc perlreftut
1) pretend is is a plain array
my @spc = @data;
2) replace the _name_ with a block ...
my @spc = @{ };
3) ... that returns a reference to an array
my @spc = @{ $data{spc} };
--
Tad McClellan SGML consulting
Perl programming
Fort Worth, Texas