Hey
problem with your for loop
#!/usr/bin/perl -w
while (<>) {
chomp;
($name,$value)=split(/\t/);
$ha{$name}+=$value;
}
foreach $i(sort keys %ha)
{
print$i." ".$ha{$i}."\n";
}
- Chandru
Andrej Kastrin wrote:
Dear Perl users,
I have 2 columns, tab separated file which looks like
Hi,
You should always have
use strict;
use warnings;
in your perl code.
u misspelled the hash %values in the for loop
On Monday 29 May 2006 16:47, Andrej Kastrin wrote:
> foreach $w (sort by_number keys %values) {
> print "$w\t$value{$w}\n"
> }
Shameer
--
--
To unsubscribe, e-mail: [