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

What is the use of command “use strict”?

1029


What is use of ‘->’ symbol?

1008


What does the qq{ } operator do?

948


Explain string comparison operators in perl.

1008


How to prevent file truncation in perl?

1019


Explain the functioning of conditional structures in perl.

949


Differentiate between c++ and perl.

1012


What is goto statement in perl?

941


How do I print the entire contents of an array with Perl?

947


How can you create anonymous subroutines?

922


How can I display all array element in which each element will display on next line in perl ?

932


What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?

989


Who created perl?

919


What does the q{ } operator do?

903


How are parameters passed to subroutines in perl?

953