Are you sure that the match part won't work? Have you checked that you can open your file and read the lines you expect?
Adding the line
use strict;
to the top of your script will make Perl tell you what it sees. Then you will find that what you see is not what Perl sees.
You should always guard your calls to open with an or die like this:
open my $file, $filename or die "Couldn't open '$filename': $!";
That way, you prevent your program from running when it can't read a file and you even get an informative error message.
In reply to Re: Regex and array
by Corion
in thread Regex and array
by Deus Ex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |