|laziness, impatience, and hubris|
One line assigment statement with regex matchby ketema (Scribe)
|on Jun 22, 2005 at 21:14 UTC||Need Help??|
ketema has asked for the
wisdom of the Perl Monks concerning the following question:
Is it possible to make an assignment of one scalar if a match is found in the elements of an array,
in a single statement? I'm sure this syntax is wrong, but something like:
I know the regular expression part is wrong, but is there some advanced Monk way of accomplishing this? What about grep? can that somehow be incorporated into the regex?