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 empty an array. How would you do that?

909


Define operators used in perl?

940


Explain what is the scalar data and scalar variables in Perl?

951


What is v-strings?

1066


What are perl strings?

886


explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

864


Explain chomp?

927


Explain the meaning of perl one-liner?

1064


Which functions in Perl allows you to include a module file or a module and what is the difference between them?

1008


For a situation in programming, how can you determine that Perl is a suitable?

897


What is the tk module?

955


Who created perl?

919


What does read () command do?

930


What is the use of "stderr()"?

1018


What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

945