ada has asked for the wisdom of the Perl Monks concerning the following question:
Hi perl peeps, I have this code to find the numbers of numbers for each entry:
my %hash; while(my $line=<>){ chomp $line; chop $line; $hash{$line}++; } print %hash;
My Q is what goes on here : $hash{$line}++; ?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Question about ++ and hash value
by grep (Monsignor) on Dec 08, 2007 at 23:46 UTC | |
by ada (Novice) on Dec 09, 2007 at 00:01 UTC | |
Re: Question about ++ and hash value
by swampyankee (Parson) on Dec 09, 2007 at 00:32 UTC | |
by ada (Novice) on Dec 09, 2007 at 00:37 UTC | |
by swampyankee (Parson) on Dec 09, 2007 at 00:47 UTC | |
by ysth (Canon) on Dec 09, 2007 at 07:36 UTC |
Back to
Seekers of Perl Wisdom