in reply to Cannot print line

Hi

As other monks given you the answer for your question.

Here I am giving you the additional information.

Always use the three-argument open.The modern version of this code is safer and clearer.

Ex:
open my $fh, '>', $filename # safer and clearer

Moreover do not use while loop to read a single line from the file.

If you want only the file content you can remove the new line from the line using chomp() function.


All is well