Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl create file

Status
Not open for further replies.

be12dune09a

Programmer
Nov 17, 2005
24
RO
sysopen (TEXT, 'myfile.txt', O_RDWR|O_EXCL|O_CREAT, 0755);
printf TEXT "Check out our text file!";
close (TEXT);

where does this code save my file??
 
It creates it in the process' current working directory. Specify the full path if you need to create it somewhere else.

You don't usually need to use sysopen, I never have in fact. Use open() instead.

Mike

I am not inscrutable. [orientalbow]

Want great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top