#! /usr/bin/perl @a = qw/a b c/; @a = test(); printf "defined: %s\nsize: %d\n" , defined @a ? 'yes' : 'no' , scalar @a ; sub test { return () ; }