if (scalar @args == 1) { # .. got an array ref } else { # treat it as a plain array }