------------------------------------------------
On Fri, 31 Jan 2003 10:59:17 -0500, "Jamie Risk" <[EMAIL PROTECTED]> wrote:

> The question stems from the fact that I don't really know what 'type' a file
> handle is; and I'm also confused about what
>    open FILEHANDLE
> does as opposed to,
>    open FILEHANDLE, $my_file
> 

A file handle is a glob. And I believe may be passed to a subroutine in the following 
manner:

subroutine_name(*FILEHANDLE);

However, in newer Perl a file handle may be stored to a scalar like any other 
reference, then it is just a matter of passing the scalar, for instance:

my $FILEHANDLE;
open($FILEHANDLE,'/path/to/file') or die "Couldn't open file for reading: $!";

...then later...

subroutine_name($FILEHANDLE) will work...though this may not be advisable.

I don't believe your first type of open will work, the second opens the specified file 
for reading.  Have a look to:

perldoc perlopentut
and perldoc -f open

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to