@a = foo(); sub foo { return(undef); } #### %h = foo(); sub foo { return(undef); } #### eval { my @a = foo(); # if I'm here, then foo() succeeded. at least, it didn't throw an error. };