in reply to Re: smart match capture
in thread smart match capture
Unfortunately, from exists in perlfunc:
Not sure what you mean by "last", that exits a block. Maybe you were thinking of first in List::Util?Be aware that calling exists on array values is deprecated and likely +to be removed in a future version of Perl.
But that is not using the smart-match operator (~~ not =~)my $retn = first {m/aa/} @a;
|
---|
In Section
Seekers of Perl Wisdom