#!/usr/bin/perl print "Please enter the file name you want the word count\n\n"; $file= ; chomp $file; $file=; chomp $file; open(FILE, $file) or die $!; my %u_wc; while (){ 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");