[Israel.pm] how to get the data type of blessed object

Itamar Elem elem at compugen.co.il
Tue Jul 13 10:46:38 PDT 2004

> >hi
> >how can i get the datatype(ARRAY,HASH,....) of blessed object


>print ref $x;


if $x is blessed to 'KUKU'
ref $x return 'KUKU'

but if see just now that you can do instead;

use attributes;

print attributes::reftype $x;

Perl mailing list
Perl at perl.org.il

More information about the Perl mailing list