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

Re: Re: Re: Re: Re: Re: Useful uses of Quantum::Superpositions?

by feanor_269 (Beadle)
on Apr 09, 2003 at 19:40 UTC ( #249382=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Useful uses of Quantum::Superpositions?
in thread Useful uses of Quantum::Superpositions?

You mean it'll DWIM? Cool... still not sure it's that useful tho...

feanor_269
  • Comment on Re: Re: Re: Re: Re: Re: Useful uses of Quantum::Superpositions?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Useful uses of Quantum::Superpositions?
by diotalevi (Canon) on Apr 09, 2003 at 19:46 UTC

    Sure its useful. Over at id:249381 I had to create a short function indexany() for use in the grep. If @searchCriteria were actually a disjunction then this code doesn't require the new function anymore.

    # Without disjunctions sub indexany { -1 != index $_, $_[0] and return 1 for @_[1 .. $#_]; re +turn 0 } @newArray = grep indexany($_, @searchCriteria), @largeArray # With disjunctions $searchCriteria = any( @searchCriteria); @newArray = grep -1 != index($_, $searchCriteria), @largeArray;
Re: Re: Re: Re: Re: Re: Re: Useful uses of Quantum::Superpositions?
by Mr. Muskrat (Canon) on Apr 09, 2003 at 19:46 UTC

    That depends on what you mean ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-12-03 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (56 votes). Check out past polls.

    Notices?