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

please tell me the problem occuring in this program,because it is giving nothing in the output file.Input file contents are same as told earlier.
  • Comment on Re^7: partial matching of lines in perl

Replies are listed 'Best First'.
Re^8: partial matching of lines in perl
by Corion (Patriarch) on Jun 15, 2020 at 13:47 UTC

    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.