Do you know where your variables are? | |
PerlMonks |
Re: Re: Re: Re: Getting element of array with a matchby Arien (Pilgrim) |
on Dec 24, 2002 at 05:04 UTC ( [id://222048]=note: print w/replies, xml ) | Need Help?? |
(Also see update in my post above.) Sure, that's the sort of way I would usually code it myself but you then have to (potentially) explain how that single line works. The only thing that might have to be explained is that matching in a list context returns a list of the captured subexpressions. The fragment is idiomatic Perl, so somebody maintaining Perl code should at least be able to read it. I wouldn't think twice about writing it like this. — Arien
In Section
Seekers of Perl Wisdom
|
|