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.
In reply to Re^6: how to create a perl program using filehandle and streams ?
by Monk_perl
in thread how to create a perl program using filehandle and streams ?
by Monk_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |