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

Re: Ultra compact set searching

by radiantmatrix (Parson)
on Nov 22, 2006 at 17:57 UTC ( #585575=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub multi_and {
       my $result = shift;
       while (@_) { $result &= shift; }
       $result;
    }
    
  2. or download this
    my $results1 = multi_and(1,2,3);             # 3 args
    my $results2 = multi_and(5,6,7);             # 3 args
    my $results3 = multi_and(12,13,14,15,16);    # 5 args
    
  3. or download this
    sub multi_and {
      my $result = shift;
      for (@_) { $result &= $_ }
      $result
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2019-12-10 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?