in reply to Re^7: how to create a perl program using filehandle and streams ?
in thread how to create a perl program using filehandle and streams ?

I am talking about perl black book. Actually i just wanted to run this script & to know about what FILEHANDLE does in the script by running.

  • Comment on Re^8: how to create a perl program using filehandle and streams ?

Replies are listed 'Best First'.
Re^9: how to create a perl program using filehandle and streams ?
by marto (Cardinal) on Apr 01, 2011 at 11:07 UTC

    Here you mention you have "some chapters" from this book, and that some of the print is bad. You've been given links several times now to up to date Perl documentation as well as tutorials and other resources for learning Perl. IMHO this is a better starting than some extracts of dubious (print) quality.

      I have created following code to display hello! on command line screen

      use strict; use warnings; use diagnostics; open (DOG, ">not.txt") or die ("Cannot open not.txt"); print DOG "hello!"; open (DOG, "<not.txt") or die ("Cannot open not.txt"); while(<DOG>){ print;} close (DOG);

      And with previous code

      use strict; use warnings; use diagnostics; open (DOG, ">not.txt") or die ("Cannot open not.txt"); print DOG "hello!"; close (DOG);

      I was thinking that the code only creates file and doesnot display contents of file on the command line screen.

        I'm not sure what you mean. I'm sure you can run your code and understand the input and output. If not you've been given links to places which explain how all this works.