Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Missing ref() return possibility?

by kyle (Abbot)
on May 16, 2008 at 21:51 UTC ( #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? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2021-12-02 01:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (16 votes). Check out past polls.

    Notices?