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);
In reply to Re: How do I CREATE a new text file in perl?
by tadman
in thread How do I CREATE a new text file in perl?
by bladx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |