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

Re: Smartmatch alternatives

by Athanasius (Monsignor)
on Dec 17, 2013 at 13:06 UTC ( #1067465=note: print w/ replies, xml ) Need Help??


in reply to Smartmatch alternatives

From the documentation for Scalar::In:

This module was written because the smartmatch operator ~~ was deprecated as experimental.

But the syntax is less elegant:

22:58 >perl -MScalar::In -wE "my @x = qw( Fred Wilma Barney Betty ); s +ay 'Found Wilma' if string_in(@x, 'Wilma');" Found Wilma 23:00 >

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


Comment on Re: Smartmatch alternatives
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2014-12-17 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (34 votes), past polls