For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > July 2004 > grep -v









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author grep -v
Mo Shivji

2004-07-23, 3:55 pm


Hi

Can someone please help.

Is there a equivalent of 'grep -v' in perl ?

Thanks

M
Joe Smith

2004-07-23, 3:55 pm

Mo Shivji wrote:

> Is there a equivalent of 'grep -v' in perl ?


In perl's grep(), '-v' is spelled '!'.
@result = grep !/foo.*bar/,@input_data;
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com