WARNING -- careful with this.
> Try
>
> $Directory=
Assuming the above was pseudocode,
> $file="$directory.$file.txt"; # don't forget to add "\" between dir
> # and file
The above will put .'s in your filename.
Replace the .'s wit
e off as too much of a jerk. =o)
Paul
> -Original Message-
> From: Paul [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 4:54 PM
> To: Shepard, Gregory R; '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: input ou
Good afternoon;
>HI,
>anyone knows the right syntax for reading and writing (appending) to a file.
>I tried this and it didn't seem to work
>open (FH,"+< file.txt" )
Try:
open (FH,">> file.txt" )
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> -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
Try
$Directory=
$file="$directory.$file.txt"; # don't forget to add "\" between dir and
file
open FH, ">$file" or die "Cannot open $file:$!";
print FH "blah \n";
print FH ""blah \n";
print FH ""blah \n";
close FH;
-Original