in reply to Counting the keywords in the text file

G'day moviesigh,

Welcome to the monastery.

You have a problem with:

my ($filename, @mainword, $distance, @search) = @ARGV;

That code will assign values as follows:

For reading complex arguments from the command line, I'd suggest Getopt::Long.

Update: Oops! Typo in my array slice: s/$ARGV[1 .. $#ARGV]/@ARGV[1 .. $#ARGV]/

-- Ken

Replies are listed 'Best First'.
Re^2: Counting the keywords in the text file
by moviesigh (Initiate) on Dec 05, 2013 at 01:13 UTC
    Thank you very much for your comments. I will check the module! Sean