Update: For most uses you are probably better off stealing GBARR's solution as posted by jmcnamara in a reply to this node. Thanks jmcnamara and gbarr. :-)
use overload; # required for either # qr// constructs are NOT considered blessed objects. sub blessed($) { (ref($_[0]) && (index(overload::StrVal($_[0]),'=')>=0) && overload::StrVal($_[0])!~/^Regexp=SCALAR/) ? ref($_[0]) : "" } # qr// constructs ARE considered blessed objects sub blessed($) { (ref($_[0]) && (index(overload::StrVal($_[0]),'=')>=0)) ? ref($_[0]) : "" }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |