in reply to grep throws an exeption

my @return = undef; # XXX Inits the array with one undef element my @return = (); # OK Empties the array. my @return; # GOOD 'my' already creates an empty array

By the way, exception has a rather precise meaning, and that isn't one. A warning is what it is. I would also accept error.

Replies are listed 'Best First'.
Re^2: grep throws an exeption
by gmoque (Acolyte) on Mar 27, 2009 at 22:33 UTC

    Thats true, sorry I was thinking in scalar context!

    Thanks!