>
>     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+/i; s/^LV Name\s*//;} `lvdisplay
$lv`);

> Or if you want to keep your line

>       push @mir2 => (grep /lvol\d+/i, `lvdisplay $lv`);
>       map s/^LV Name\s*//, @mir2;

> Since grep returns the value when the expression is true, if the >
>substitution 
>succeeds, you will get the modified string.

>Correct me if I'm wrong, but all of the expressions in the block have
to 
>evaluate to true for grep to return the value when using the block
form.

>In the last one, you are carrying out the substitution on each element
of >the 
>array that you created.

>Hope The Helps, Derek


Jaime, 

That did it... thank you much
Derek


Derek Bellner Smith
Unix Systems Engineer
Cardinal Health Dublin, Ohio
614-757-5000 Main
614-757-8075 Direct
614-757-8120 Fax
[EMAIL PROTECTED]


Cardinal Health -- Working together. For life. (sm)
_________________________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk 
- Portuguese - Svenska: www.cardinalhealth.com/legal/email

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to