home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeJava and XSLTSearch this book

8.127. IO::File

Inherits from IO::Handle and IO::Seekable, extending them with methods specific to filehandles. Provides three such methods.

new

$fh = new ([params])

Constructor. Creates an IO::File object, passing any parameters to the method open. If the open fails, the object is destroyed. Otherwise, it is returned to the caller.

new_tmpfile

$fh = new_tmpfile

Constructor. Creates an IO::File object opened for read/write on a newly created temporary file. If the system permits, the temporary file is anonymous; if the temporary file cannot be created or opened, the object is destroyed. Otherwise, it is returned to the caller.

open

$fh->open(filename[, mode[, perms]])

Opens the newly created filehandle. Accepts one, two, or three parameters. With one parameter, it acts as a frontend for Perl's built-in open function. With two parameters, the first parameter is a filename, and the second is the open mode, optionally followed by a third parameter, the file permission value.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.