Hi,
correct is:
$pvolumes{$pv}->{volumes} ||= []; ## create empty array if it wasn't yet used
push @{$pvolumes{$pv}->{volumes}}, "$lv:$lp:$pp:$dist";
On Thursday 31 May 2001 13:21, Gary Stainburn wrote:
> Hi all,
>
> I'm writing a small script to collect info from various system commands
> to produce a small meaningfull report on our AIX box.
>
> I have a hash %pvolumes which lists all my physical volumes, and I can
> add scalars to it no problem, e.g.
>
> $pvolumes{$pvolume}->{vgroup}=$vgroup;
>
> however, I want to have an array containing the logical volumes held
> on the phsical one, but I can't get the syntax right. I tried
>
> push @$pvolumes{$pv}->{volumes},"$lv:$lp:$pp:$dist";
> push $pvolumes{$pv}->{volumes},"$lv:$lp:$pp:$dist";
>
> and
>
> push @$pvolumes{$pv}->{volumes},"$lv:$lp:$pp:$dist";
--
Ondrej Par
Internet Securities
Software Engineer
e-mail: [EMAIL PROTECTED]
Phone: +420 2 222 543 45 ext. 112