type of list element in Perl ?
I wonder if it's possible to know the type of a list element, i.e. is it a scalar or a list reference or a hash reference ?
My initial problem is to implement a data structure for three kinds of "phenomena" - word, optional word and alternative word. I think to use a list containing scalars for words, references to lists for optional words and references to hashes for alternatives.
Thank you in advance.
try "ref( $reference )".
Exactly what I'm looking for (should've thought it with my head...).
Perl is really great...
|All times are GMT -5. The time now is 05:14 AM.|