Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: smartmatch with multiple search values

by daxim (Curate)
on Jul 16, 2019 at 18:35 UTC ( [id://11102939]=note: print w/replies, xml ) Need Help??


in reply to smartmatch with multiple search values

I recognise this as a set problem.
Set::Scalar->new(qw(11 14))->intersection( Set::Scalar->new(qw(4 5 6 7 8 9 10 11 12)) )->members # 11
You might also be interested in Perl6::Junction/Quantum::Superpositions.

Replies are listed 'Best First'.
Re^2: smartmatch with multiple search values
by toohoo (Beadle) on Jul 18, 2019 at 06:54 UTC

    Hello Daxim

    thanks so far.

    Can't locate object method "new" via package "Set::Scalar" (perhaps you forgot to load "Set::Scalar"?)

    I have a restricted Perl environment here and can not install packages.

    but thanks and regards

      can not install packages
      Just fatpack the module.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-20 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found