kprasanna_79 has asked for the wisdom of the Perl Monks concerning the following question:
@array=('a.b','a'); @result=grep (/\ba\b/,@array); print $_."\n"for(@result);
Result:- a.b a
I need only the word a to be greped from the @array, not a.b.
Any suggestions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question on Grep Function
by kennethk (Abbot) on Feb 27, 2009 at 17:00 UTC | |
|
Re: Question on Grep Function
by jettero (Monsignor) on Feb 27, 2009 at 16:55 UTC | |
by CountZero (Bishop) on Feb 28, 2009 at 09:03 UTC | |
|
Re: Question on Grep Function
by artist (Parson) on Feb 27, 2009 at 16:53 UTC |