#!/usr/bin/perl print "Please enter the file name you want the word count\n\n"; $file= <STIDN>; chomp $file; $file=<STDIN>; chomp $file; open(FILE, $file) or die $!; my %u_wc; while (<FILE>){ my @words= split; $words += @words; $u_wc{$_}++ for @words; } print ("The number of words in the file is $words\n\n"); print ("this are the unique words $u_wc\n\n");
In reply to Re^2: Sorting Unique
by rolandomantilla
in thread Sorting Unique
by rolandomantilla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |