Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: smart match capture

by cdarke (Prior)
on Oct 13, 2011 at 14:02 UTC ( #931245=note: print w/ replies, xml ) Need Help??


in reply to Re: smart match capture
in thread smart match capture

Unfortunately, from exists in perlfunc:

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


Comment on Re^2: smart match capture
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://931245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2015-08-03 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (23 votes), past polls