rajkrishna89 has asked for the wisdom of the Perl Monks concerning the following question:
Im trying to grep a variable which is used in an array to search in files...
if ( grep /$Check /i, <FILE> )
The check variable contains tags such as 1() 2() 3()
i want to match the whole tag but the following tags are getting grepped 1( 2 3(
I want the grep the whole tag ..i tried the following
if ( grep -w "$Check", <FILE> ) if ( grep -o "$Check", <FILE> )
but its stil not working
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl GREP
by Corion (Patriarch) on Jan 03, 2012 at 15:47 UTC | |
|
Re: Perl GREP
by runrig (Abbot) on Jan 03, 2012 at 15:51 UTC | |
|
Re: Perl GREP
by kennethk (Abbot) on Jan 03, 2012 at 15:52 UTC |