Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: an easier way with grep, map, and/or sort?

by tadman (Prior)
on Jul 19, 2002 at 17:45 UTC ( [id://183334]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if (55 < $age && $age <= 60) ...
  2. or download this
    foreach (keys %insitution_table)
    {
         $institution_table{$_}{ages}[$age/5]++;
    }
    
  3. or download this
    my $sample = $insitution_table{$_}{ages}[60/5];
  4. or download this
    my %valid_institutions = map { $_ => $_ } (
          $hospital1,
    ...
              || "unaffiliated";
    
    $institution_table{$key}{count}++;
    
  5. or download this
    my %foo = map { $_ => 1 } qw[ foo bar baz ];
    
    my $foo = 'foo';
    print "\$foo is in the list\n" if ($foo{$foo});
    
  6. or download this
    ... $valid_institution{lc($institution)} || ...
  7. or download this
    ... $valid_institution{lc($institution)} && lc($institution) ||  ...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found