Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Manipulating Arrays

by damian1301 (Curate)
on Jul 31, 2001 at 01:38 UTC ( #100985=note: print w/ replies, xml ) Need Help??


in reply to Counting repeated values from an array

A more of a golfed response.

@names=qw/tom tom tom green/; my%h;%_=map{$h{$_}++}@names;map{print"$_=",$h{$_},"\n"}keys%h;


$_.=($=+(6<<1));print(chr(my$a=$_));$^H=$_+$_;$_=$^H; print chr($_-39); # Easy but its ok.


Comment on Re: Manipulating Arrays
Select or Download Code
Replies are listed 'Best First'.
Re: Re: Manipulating Arrays
by ChOas (Curate) on Jul 31, 2001 at 12:41 UTC
    Or... without some maps:
    my @names=qw/tom tom tom green/; $_{$_}++for@names;print"$_=$_{$_}\n"for keys%_;

    GreetZ!,
      ChOas

    print "profeth still\n" if /bird|devil/;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2015-08-29 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (343 votes), past polls