maybeD has asked for the wisdom of the Perl Monks concerning the following question:
The code is intended to match each element of the array of randomized entries with the lists of entries in the "array of lists to match". If there is a match, the match counter increases by 1.sub match_randomized_lists { $count = 0; open (RANDOMIZED_LIST, $randomized_list) || die print "Script cann +ot open $randomized_list"; my @randomized_list = <RANDOMIZED_LIST>; print $randomized_list; print "\n"; print @randomized_list; print "\n"; foreach my $list_to_match (@array_of_lists_to_match) { $count = $count + 1; print OUTPUT "NUMBER "; print OUTPUT $count; $match_count = 0; foreach my $randomized_entry (@randomized_list) { chomp $randomized_entry; if ($list_to_match =~ /$randomized_entry/) { $match_count = $match_count + 1; } } print OUTPUT ": "; print OUTPUT $match_count; print OUTPUT "\n\n"; } }
This way for each randomized list, I get a total number of matches with each list of entries. This is printed to an output file and further calculations are carried out on these at a later stage.
In ActiveState and UNIX, the subroutine works as expected, finding matches. In Cygwin, it never finds any matches.
Before I resort to installing Cygwin on my own computer, is/are there any known issues with anything in my code and Cygwin?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Doesn't work in Cygwin
by BerntB (Deacon) on Nov 16, 2005 at 11:58 UTC | |
by bart (Canon) on Nov 16, 2005 at 12:28 UTC | |
by maybeD (Sexton) on Nov 16, 2005 at 12:58 UTC | |
by bart (Canon) on Nov 16, 2005 at 17:17 UTC | |
|
Re: Doesn't work in Cygwin
by Happy-the-monk (Canon) on Nov 16, 2005 at 11:42 UTC | |
by maybeD (Sexton) on Nov 16, 2005 at 11:48 UTC |