in reply to Re: "Pattern Matching", not using regex
in thread "Pattern Matching", not using regex

Please, please, please. Reading in all lines of a file into an array is standard idiom. Do not use such a silly, inefficient, routine. And NEVER EVER forget to check the return value of open.

Here's how you read the file into an array:

open my $fh => $file or die "Open failed: $!"; my @array = <$fh>; close $fh;
If you want to chomp of newlines, add the following line:
chomp @array;
Don't reinvent the wheel. And don't code perl primitives in Perl.

Abigail