This is a discussion on How do you open a file for writing? within the Perl forums, part of the Software Development category; How do you open a file for writing?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, Writing (Overwriting) We open the file for writing much like we have before, but this time we use just one > symbol before the file variable, rather than the two we used for appending: Code: $sitename="Discussweb";
$siteurl="http://www.Discussweb.com";
$description="A Super Discussion Site";
$sitedata="websites.txt";
# write to the data file
open(DAT,">$sitedata") || die("Cannot Open File");
print DAT "$sitename\|$siteurl\|$description\n";
close(DAT); Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to open a file with its default program | Manikandan.S | ASP and ASP.NET Programming | 2 | 03-10-2008 10:04 PM |
| how to Open a .pdf file on an AJAX enabled site? | kingmaker | ASP and ASP.NET Programming | 0 | 08-25-2007 03:01 AM |
| Reading and Writing to File using UTL_FILE in ORACLE | Murali | Database Support | 2 | 08-23-2007 11:12 PM |
| how to open and retrive text file(.txt)? | una_noche | Java Server Pages (JSP) | 1 | 08-17-2007 03:27 AM |
| Writing MYSQL Query Recordset into external file. | Murali | Database Support | 2 | 07-19-2007 08:03 AM |