if (scalar @args == 1) { # .. got an array ref } else { # treat it as a plain array } #### if (ref($date) =~ /^ARRAY$/) { # ... its an array ref } elsif (ref($date) =~ /ARRAY/) { # ... its an array based class } elsif (overload::Overloaded($date)) { # ... although not definitive, # its possible that @{} is overloaded # use this at your own risk } else { # its probably a string .... }