Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Compare all array values without a loop

by Crian (Chaplain)
on Oct 19, 2004 at 15:21 UTC ( #400558=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @array = ('A','B','C','D');
    for (@array) {
      $hash{$_} = undef;
    }
    
  2. or download this
    my @array = qw/A B C D/;
    my %hash;
    @hash{@array} = ();
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://400558]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-07-16 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (333 votes). Check out past polls.

    Notices?