in reply to Re^3: Using grep to pick out Specific lines in a text file
in thread Using grep to pick out Specific lines in a text file

Works great but now i think i want it to look different... woulld look like the blow

30.6511 (V6.5.1 FP1) KALLATOM@de.ibm.com 255.255.255.255 (then a count of how may timesit showed up)

  • Comment on Re^4: Using grep to pick out Specific lines in a text file

Replies are listed 'Best First'.
Re^5: Using grep to pick out Specific lines in a text file
by hdb (Monsignor) on Apr 17, 2013 at 19:17 UTC

    Guess what! That's what $found{$1}++ is for. Just print not only the keys but also the values of hash %found.

      That is what i thought but i was working with it and cuold not make it produce what i wanted

        Instead of

        print join( "|", keys %found), "\n";

        try

        for my $key (keys %found) ( print "$key: $found{$key}\n"; }