Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by Anonymous Monk
on Dec 04, 2016 at 21:23 UTC ( [id://1177171]=note: print w/replies, xml ) Need Help??


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

Take a reference or let Prototypes do it for you
#!/usr/bin/perl -- use strict; use warnings; sub istg(*) { warn shift } sub istgg { my $f = shift; my $ff=\$f; warn "$f $ff" } istg(1); istgg(1); istg(*ARGV); istgg(*ARGV); __END__ 1 at - line 4. 1 SCALAR(0x99ba0c) at - line 5. GLOB(0x99b5bc) at - line 4. *main::ARGV GLOB(0x99ba0c) at - line 5.

Log In?
Username:
Password:

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

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

    No recent polls found