in reply to Re: Re: Re: Unique items in a text file
in thread Unique items in a text file

I got the same here, how would you do if you had to add this numbers up instead of displaying them in order?
  • Comment on Re: Re: Re: Re: Unique items in a text file

Replies are listed 'Best First'.
Re^5: Unique items in a text file
by Tomte (Priest) on Apr 20, 2004 at 14:57 UTC

    change

    print $_ . ': ' . $erg{$_} . '<br />' . "\n" foreach (keys %erg);
    to
    my $erg = 0; $erg += $erg{$_} foreach (keys %erg); print $erg,"\n";

    regards,
    tomte


    An intellectual is someone whose mind watches itself.
    -- Albert Camus