Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you open a file for writing?

Answer Posted / raj

Files are opened using the open and sysopen function.
Either function may be passed up to 4 arguments, the first
is always the file handle thenfile name also known as a URL
or filepath, flags, and finally any permissions to be
granted to this file.

$FH = "filehandle";
$FilePath = "myhtml.html";

open(FH, $FilePath, permissions);
or
sysopen(FH, $FileName, permission);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You want to download the contents of a url with perl. How would you do that?

877


Explain goto name?

937


What is grep used for in perl?

925


What are the arguements we normally use for perl interpreter?

964


How to convert arrays into a string in perl?

947


What package you use to create a windows services?

887


Explain lists in perl?

972


What is the use of -n and -p options?

1048


What is perl dbi?

892


How to replace perl array elements?

953


how to get back up from private character editor which is saved in the format of .udf

2293


how to extract pin_code,phone_number,year from text file using regular expressions in perl

2236


What is perl programming?

1027


List the files in current directory sorted by size ?

987


What does undef function in perl?

950