Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Missing ref() return possibility?

by kyle (Abbot)
on May 16, 2008 at 21:51 UTC ( [id://687029]=note: print w/replies, xml ) Need Help??


in reply to Re: Missing ref() return possibility?
in thread Missing ref() return possibility?

What your code implies but isn't quite explicit about is that qr() actually gives back a blessed reference to a scalar.

use Scalar::Util qw/blessed reftype/; my $q = qr//; print 'ref: ', ref($q), "\n"; print 'blessed: ', blessed($q), "\n"; print 'reftype: ', reftype($q), "\n"; __END__ ref: Regexp blessed: Regexp reftype: SCALAR

There's some more about this in How can I tell if an object is based on a regex?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found