Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Array Question

by Transient (Hermit)
on Aug 19, 2005 at 14:30 UTC ( #485156=note: print w/replies, xml ) Need Help??


in reply to Array Question

There are many examples already in the monastery, but here's one way:
#! /perl/bin/perl use Data::Dumper; use strict; my @letters = ("red","red","red","blue","white","yellow","blue","navy" +,"navy","green","white","cars"); my %count = (); $count{$_}++ for @letters; print Dumper( \%count );

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-07-03 20:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?