Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Smartmatch alternatives

by Athanasius (Canon)
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 imbibing at the Monastery: (7)
As of 2016-02-13 19:38 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (443 votes), past polls