greatshots has asked for the wisdom of the Perl Monks concerning the following question:
the above code gives the output as 'Matched'. what should I need to do to get the output as 'Matched In file1:aa'?@array = ( "file1:aa" , "file2:bb" , "file3:cc" ); if ( grep ( /aa/i,@array) ) { print "Matched\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to get the full array value if part of the element matches
by McDarren (Abbot) on Oct 20, 2006 at 04:23 UTC | |
by blazar (Canon) on Oct 20, 2006 at 18:54 UTC | |
|
Re: how to get the full array value if part of the element matches
by davido (Cardinal) on Oct 20, 2006 at 04:27 UTC | |
|
Re: how to get the full array value if part of the element matches
by fenLisesi (Priest) on Oct 20, 2006 at 06:45 UTC |