etc. Messy but would take care of the problem. This is how I handle some XML data structures deparsed from API calls to certain applications that can return an array of hashrefs, an arrayref of hashrefs, a single hashref or undefined.@ret = somesub(); if (ref $ret[0] eq 'HASH') { .... } elsif (ref $ret[0] eq 'ARRAY') { .... }
In reply to Re^3: check for wantarray?
by bageler
in thread check for wantarray?
by KurtZ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |