in reply to Re^7: partial matching of lines in perl
in thread partial matching of lines in perl

You have

use warnings;

at the top of your program.

When you run your program, Perl will tell you at least one problem in your program immediately:

perl -wle 'open my $fh, "<", "test.txt"; print $fh "hello"' Filehandle $fh opened only for input at -e line 1.

If you don't get this output, please either post the real code you are using or find a way to see the output of your program.