RE: hash assignments

2006-05-16 Thread Smith, Derek
> > foreach my $lv (@lvs) { > > push @mir => (grep /mirror/i, `lvdisplay $lv`); > > push @mir2 => (grep /lvol\d+/i, `lvdisplay $lv`); > Try replacing the above line with > push @mir2 => (grep s/^LV Name\s*//, `lvdisplay $lv`); > Or > push @mir2 => (grep {/lvol\d

Re: hash assignments

2006-05-15 Thread Jaime Murillo
On Monday 15 May 2006 14:40, Smith, Derek wrote: > I have this system output > > > > --- Logical volumes --- > > LV Name /dev/vg00/lvol1 > > VG Name /dev/vg00 > > > And I have this multiple lvols populated into 2 arrays like printed like > so: > > > > Mirr

RE: hash assignments

2006-05-15 Thread Smith, Derek
>On 5/15/06, Smith, Derek <[EMAIL PROTECTED]> wrote: > I tried an push @mir2 => (unless /lv\d+/i, `lvdisplay $lv`); in place of > the third push > > But that gave me an error: Uncaught exception from user code: > >syntax error at HPUX_verify_system.pl line 127, near "(unless"

Re: hash assignments

2006-05-15 Thread Tom Phoenix
On 5/15/06, Smith, Derek <[EMAIL PROTECTED]> wrote: I tried an push @mir2 => (unless /lv\d+/i, `lvdisplay $lv`); in place of the third push But that gave me an error: Uncaught exception from user code: syntax error at HPUX_verify_system.pl line 127, near "(unless" Yes; that's a syntax