thanks jeff.

now I want to redirect the output of this grep command to file . how do
I do that

I tried in the following way
for (@vob_list){
    my @repl = `$CT lsreplica -invob $_`;
    my @repl2 = grep { /cmvobsvr1mum/ } @repl >> /tmp/log ;
    print @repl2;
}

but it didn't work

plz help

Regards
Irfan.

 

-----Original Message-----
From: Jeff Peng [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 12:31 PM
To: Sayed, Irfan (Irfan); beginners@perl.org
Subject: RE: Perl help


>
>foreach (@vob_list)
>  {
>     my @repl = `$CT lsreplica -invob $_ | grep cmvobsvr1mum`; print 
>@repl;
>  }
>

Could you use perl's grep instead?Like:

for (@vob_list){
    my @repl = `$CT lsreplica -invob $_`;
    my @repl2 = grep { /cmvobsvr1mum/ } @repl;
    print @repl2;
}



--
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