in reply to Re^3: Sorting Unique
in thread Sorting Unique

Ok but what I needed what the count of the unique words, not the actual unique words. By the way thanks all you perlmonks you guys are helping me big time

Replies are listed 'Best First'.
Re^5: Sorting Unique
by muba (Priest) on Aug 19, 2011 at 04:28 UTC

    Fair enough.

    You could go with

    while ( my ($word,$count) = each %u_wc) { print "$word: $count\n" }

    Or you could go with print "$_: $u_wc{$_}\n" for keys %u_wc;. And there are many other ways but these will suffice.