die "element isn't an array ref" if ref($_) ne "ARRAY"; #### if (ref($_) ne "ARRAY") { die "element isn't an array ref"; }