User Control Panel
Advertisements

HELP US, HELP YOU!

Open a file for reading and writing!

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl
View unanswered posts
Author Message
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 579
Location: Maidstone
Reputation: 67.1
votes: 4

PostPosted: Wed Apr 26, 2006 7:06 pm    Post subject: Open a file for reading and writing! Reply with quote

Hi everyone. (is anyone actually out there?)
I am trying to get a file to open for reading and writing. i have tried
Code:
open (NEWSI, "> ./news1");
but i cannot write to it as it is only open for output
and when i try
Code:
open (NEWSI, "< ./news1");
I cannot read it as it isn't open for input.

I know that >> opens it for data to be added. But i want it to be opened so it can be read and replaced.

Any help Much appreciated.

_________________
"Help us, Help you" - BotDepot
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Wed Apr 26, 2006 9:08 pm    Post subject: Reply with quote

Do it in two statements?
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group