in reply to How do I CREATE a new text file in perl?
The > in the open call means to open for writing. You can create it empty, too, by not writing anything.my ($file) = 'thefilename.txt'; open (FILE, ">$file") || die "Could not write to $file\n"; print FILE $stuff; close (FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I CREATE a new text file in perl?
by bladx (Chaplain) on Feb 18, 2001 at 02:20 UTC |