> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 5:10 PM
> To: [EMAIL PROTECTED]
> Subject: input output append
>
>
> HI,
> anyone knows the right syntax for reading and writing
> (appending) to a file.
I assume you mean "open a file for both reading and writing", since
the code you posted doesn't do any reading or writing.
> I tried this and it didn't seem to work
> open (FH,"+< file.txt" )
Define "didn't seem to work". The file must exist for this open to succeed.
open(FH, '+>>file.txt') will open file for append, creating if necessary,
and allowing read access. But all writes go to end of file.
perldoc perlopentut gives all the gory details of how to open things.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]