use Want; sub funner { if (want('LIST')) { return qw/Larry Curly Moe/; } elsif (want('ARRAY')) { return [ qw/Larry Curly Moe/ ]; } else { croak("listy type contexts only"); } } print Dumper [ funner() ]; print Dumper [ @{funner()} ]; funner(); __END__ $VAR1 = [ 'Larry', 'Curly', 'Moe' ]; $VAR1 = [ 'Larry', 'Curly', 'Moe' ]; listy type contexts only at ...