Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

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

Help for this page

Select Code to Download


  1. or download this
    $ perl -MScalar::Util=reftype -e'
       my $s = *STDOUT;
       CORE::say reftype(\$s) eq "GLOB";
    '
    1
    
  2. or download this
    $ perl -MScalar::Util=reftype -e'
       my $s = \*STDOUT;
       CORE::say reftype($s) eq "GLOB";
    '
    1
    
  3. or download this
    $ perl -MScalar::Util=reftype -e'
       open(my $s, "<&", *STDOUT) or die $!;
       CORE::say reftype($s) eq "GLOB";
    '
    1
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-03-28 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found