in reply to Re^5: how to create a perl program using filehandle and streams ?
in thread how to create a perl program using filehandle and streams ?
Wow! when i run the following script then hello! can be seen inside "not.txt" file after once scrip is run
use strict; use warnings; use diagnostics; open (FILEHANDLE, ">not.txt") or die ("Cannot open not.txt"); print FILEHANDLE "hello!"; close (FILEHANDLE);
it means book assumed me as knower of perl so it didn't mentioned to write
use strict; use warnings; use diagnostics;
before that script.anyway in the book above example the line is" Here's an example in which we open a file for output and print some text to that file". So i think it just replaced(or write) that whole script into word "hello"! and if i write different word then that word will be there after scrip running.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: how to create a perl program using filehandle and streams ?
by marto (Cardinal) on Apr 01, 2011 at 10:26 UTC | |
by GrandFather (Saint) on Apr 02, 2011 at 22:13 UTC | |
by Monk_perl (Initiate) on Apr 01, 2011 at 10:42 UTC | |
by marto (Cardinal) on Apr 01, 2011 at 11:07 UTC | |
by Monk_perl (Initiate) on Apr 01, 2011 at 12:15 UTC | |
by marto (Cardinal) on Apr 01, 2011 at 12:22 UTC |