my @arr = eval { @$x }; @arr = ($x) if $@; [download]
In reply to Re: elegant array assignment by salva in thread elegant array assignment by lackita