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 (
Comments
Post a Comment