in reply to Re^2: help with error 'readline() on unopened filehandle'
in thread help with error 'readline() on unopened filehandle'

You need to "open" your input file dummy
  • Comment on Re^3: help with error 'readline() on unopened filehandle'

Replies are listed 'Best First'.
Re^4: help with error 'readline() on unopened filehandle'
by bhargavkanakiya (Initiate) on Feb 03, 2013 at 08:10 UTC

    i understood that and updated the code as

    ... open my $MYFILE , "<$filename" || "Can't open the output file!"; ...

    then the error changed to 'readline() on closed filehandle $MYFILE' even though i have not closed the file. this is the first code that i've written using perl and i am completely new to it. any help is appreciated. thanks.

    A reply falls below the community's threshold of quality. You may see it by logging in.