Shaw, Matthew wrote:
No one has mentioned (I think) that filehandles are actually 'typeglobs'

Scalars, arrays, hashes, subroutines, filehandles and directory handles are all part of a typeglob.


$ perl -le'

$x = 987;
@x = qw/a b c d/;
sub x { print qq/z is "@z" "@_"/ }

*z = *x;

z( $z ) if $z == 987;
'
z is "a b c d" "987"


yet so I thought I'd chime in on this. They also actually do have an
associated sigil: '*'.

There's plenty of explanation on filehandles in typeglobs in the
following documents:

perldoc perldata (Heading: 'Typeglobs and Filehandles')

The 'SEE ALSO' section of the data document points to more information
on typeglobs:

    See perlvar for a description of Perl's built-in variables and a
    discussion of legal variable names. See perlref, perlsub, and
"Symbol
    Tables" in perlmod for more discussion on typeglobs and the
*foo{THING}
    syntax.


John
--
use Perl;
program
fulfillment

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to