Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Increasing key/values held in a Hash from an Array

by fizbin (Chaplain)
on Mar 17, 2006 at 21:36 UTC ( #537589=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @scorearray = map { {score=>$_, text=>$hash{$_}} } keys %hash;
    
  2. or download this
    for my $word (@scoreWords) {
      my $qmword = quotemeta($word);
    ...
        $scorebit->{'score'} += 1 if $scorebit->{'text'} =~ $regexp;
      }
    }
    
  3. or download this
    printf "%-7s%s\n", "Score", "Value";
    for my $scorebit (@scorearray) {
      printf "%5d  %s\n", $scorebit->{'score'}, $scorebit->{'text'};
    }
    
  4. or download this
    @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
    map{y/X_/\n /;print}map{pop@$_}@/for@/
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2022-10-07 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (29 votes). Check out past polls.

    Notices?