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

How to change a directory in perl?

980


Is perl compiler or interpreter?

980


How would you ensure the re-use and maximum readability of your perl code?

984


Define print() function in perl?

950


How to find the length of an array in perl?

1058


How to remove a directory in perl?

1046


Explain perl one-liner?

996


What does -> symbol indicates in Perl?

1033


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

1038


What is the use of '>>' in perl?

1074


What is the use of -t?

1020


Differentiate use and require?

998


How to close a file in perl?

1003


Explain goto expr?

917


What does perl do in linux?

984