perl - How to get the type of the reference? -


There is no function available in Perl for reference types:

  my $ ref = \ @ Array;  

I need to get the array reference type by function.

Use Ref :

 < Code> $ ref_type = ref $ ref;  

The return value is one of these: SCALAR , ARRAY , hash , CODE << Strong> context ( context of context) ), globe ( type tag reference) and P> Actually, the Ref function can return more value and object return package instead of name instead of type:.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -