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 / raghav

To open a file:

open (FILE, "<raghav.txt") || die ("File Cannot be opened");

Where FILE is the file handle for this file.
Here the file is opened in read mode.
Put > for write mode
put >> for append mode.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?

955


what is Perl one liner?

858


What is 'rollback' command in perl?

901


Explain different types of perl operators.

880


Enlist the advantages of using c over perl?

861


Differentiate between arrays and list in perl.

947


How do I replace every TAB character in a file with a comma?

921


How can memory be managed in Perl?

972


What is the function of cgiwrap in cgi programming?

866


Write syntax to add two arrays together in perl?

871


How to prevent file truncation in perl?

936


Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?

1033


Explain about typeglobs?

875


Which has the highest precedence, List or Terms? Explain?

849


Explain lists ?

881