in reply to Re^4: how to create a perl program using filehandle and streams ?
in thread how to create a perl program using filehandle and streams ?
I know, I told you what was wrong and what had to be fixed to get your code to overwrite itself with "hello!", which is what you seem to want to do for some reason.
open (FILEHANDLE, ">not.txt") or die (Cannot open not.txt"); print FILEHANDLE "hello!"; close (FILEHANDLE);
Should be:
open (FILEHANDLE, ">not.txt") or die ("Cannot open not.txt"); print FILEHANDLE "hello!"; close (FILEHANDLE);
Had you read any of the links I provided you'd be using something like:
use strict; use warnings; use diagnostics; open (FILEHANDLE, ">not.txt") or die ("Cannot open not.txt"); print FILEHANDLE "hello!"; close (FILEHANDLE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: how to create a perl program using filehandle and streams ?
by Monk_perl (Initiate) on Apr 01, 2011 at 10:19 UTC | |
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 | |
|