in reply to Re^3: if (defined @arr) problem
in thread if (defined @arr) problem

You missed plugging it into the whole script. I said "do this first", didn't I?

Well, apparently that wasn't clear, so here is the whole current script, as I see it.

#! /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 () ; }

Replies are listed 'Best First'.
Re^5: if (defined @arr) problem
by parv (Parson) on Dec 15, 2005 at 18:42 UTC
    Yes, you certainly mentioned "do(ing) it first". I was not sure what or where exactly you meant for the behaviour shown (in the complete program given above) is what /i/ already expect. Thanks for the clarification.