Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How do I determine if a variable contains a type glob?

by ikegami (Patriarch)
on Dec 05, 2016 at 01:23 UTC ( [id://1177184]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I determine if a variable contains a type glob?
in thread How do I determine if a variable contains a type glob?

A variable never contains a type glob. It either is a typeglob by itself

Not so. Scalars can contain globs.

my $fh = *STDOUT;

Globs can also also contain other globs. (The slot is named GLOB.) That's how subpackages are stored.

Replies are listed 'Best First'.
Re^3: How do I determine if a variable contains a type glob?
by shmem (Chancellor) on Dec 06, 2016 at 22:41 UTC

    Indeed; thank you. Haddocks' Eyes, again.

    my $f = *STDOUT; $STDOUT{foo} = 'bar'; print *{$f}{HASH}{foo},"\n"; print ${$f}{foo},"\n"; __END__ bar bar

    ...resiling to my hermitage for a revision course of perl data.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1177184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found