you might also find the unix command 'touch' useful. read the man page
for specifics.
___
[EMAIL PROTECTED]
http://www.quantifier.org
___
If I had any humility I would be perfect.
-- T
thanks, all.
Andrew Prueser
cc:
Subject: RE: create a new file
--- Andrew Prueser <[EMAIL PROTECTED]> wrote:
> open(FILEHANDLE, ">filename")
>
> the '>' indicates open for append, or create if doesn't exist.
Oops -- you just blasted the file!
use two:
open FILEHANDLE, ">>filename" or die $!;
> checkout 'perldoc -f open' for all the fun things you can
--- Nichole Bialczyk <[EMAIL PROTECTED]> wrote:
> ok, so i know how to write to an existing file, how do i create the
> file, if it doesn't exist? i want to do something like,
>
> pseudocode -- ewww!
LOL!!! =o)
> if the file exists{
> write to it
> }
>
> if the file does not exist{
>
On Fri, Jun 01, 2001 at 11:09:35AM -0500, Nichole Bialczyk wrote:
: ok, so i know how to write to an existing file, how do i create the file,
: if it doesn't exist? i want to do something like,
Thankfully, when you open a file for apending (using '>> somefile'),
it will create the file if it do
]
Sent: Friday, June 01, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: create a new file
ok, so i know how to write to an existing file, how do i create the file,
if it doesn't exist? i want to do something like,
pseudocode -- ewww!
if the file exists{
write to it
}
if the file does not e
ok, so i know how to write to an existing file, how do i create the file,
if it doesn't exist? i want to do something like,
pseudocode -- ewww!
if the file exists{
write to it
}
if the file does not exist{
create it
write to it
}
close the file