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 reply to Re^2: smart match capture
by cdarke
in thread smart match capture
by perlperlperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |