if (eval{ use strict 'refs'; @$foo; 1 }) { # it is, or pretends convincingly, to be an array ref }