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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does this command do ?

Status
Not open for further replies.

shlomyb

Programmer
Nov 14, 2006
32
IL
Is there a meaning to
open(FILE,"<>file.txt) command.
I am asking because it seems that when I tried to use the open command again but instead <> I used < things get a little bit weird , meaning :
open (FILE,"<","file.txt")or die ("EXIT);
I got a return value 1 but not "EXIT" !

Can be?

-thanks.

 
A return value 1 means the file was opened successfully.

From perlopentut ( )

If the filehandle was previously opened, it will be implicitly closed first.

So opening a filehandle twice in a row doesn't cause error; Perl closes the handle and then opens it again.

-------------
Kirsle.net | Kirsle's Programs and Projects
 
Thanks ,

Is there a meaning to the "<>" ?
 
Not sure about the "<>", but there is mention of reading and writing from the same source in the link that Kirsle provided.

Ethan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top