Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Smartmatch alternatives

by Athanasius (Abbot)
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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2015-07-29 03:32 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (260 votes), past polls