Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Array problems.....

by vinoth.ree (Monsignor)
on Mar 19, 2013 at 04:58 UTC ( #1024205=note: print w/replies, xml ) Need Help??

in reply to Array problems.....

Try this too...

use strict; use warnings; use Data::Dumper; my %hash; while(<DATA>) { my ($player,$tableid) = split; if (exists $hash{$tableid}) { push ($hash{$tableid},$player); } else { $hash{$tableid} = [$player]; } } print Dumper \%hash; while(my($tableid,$player) = each(%hash)) { print "\n\nTableid:$tableid\n"; print "\nPlayer:".join("\n",@{$player}); print "\nTotal:". scalar @{$player}; } __DATA__ kapp2cape1111 224 kapp2cape1113 224 kapp2cape1112 224 kapp2cape1111 225 kapp2cape1113 225 kapp2cape1112 225

All is well

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-10-27 19:19 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (369 votes). Check out past polls.