perlperlperl has asked for the wisdom of the Perl Monks concerning the following question:
Thankspush @a, "aaa"; push @a, "bbb"; if ( @a =~ m/aa/) { #how do I print the line in @a that matches 'aa' #without going through the array. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: smart match capture
by davido (Cardinal) on Oct 13, 2011 at 15:18 UTC | |
|
Re: smart match capture
by pvaldes (Chaplain) on Oct 13, 2011 at 13:35 UTC | |
by cdarke (Prior) on Oct 13, 2011 at 14:02 UTC | |
|
Re: smart match capture
by Anonymous Monk on Oct 13, 2011 at 13:42 UTC |