in reply to Re^2: return values are undef after return
in thread return values are undef after return

so after reading that tut i am confuzzled as to whether i should be undef'ing the array or any variables in general

;P But you don't undef the array in return values are undef after return after you return :D

undefing vars can't hurt, and it could trigger warnings if you use those vars later in your messy code :)

If you seek clarity about when to undef, you seek clarity about scoping :) read Tutorials: Variable Scoping in Perl: the basics, Coping with Scoping , Mini-Tutorial: Perl's Memory Management, Lexical scoping like a fox

  • Comment on Re^3: return values are undef after return

Replies are listed 'Best First'.
Re^4: return values are undef after return
by perlaintdead (Scribe) on Dec 26, 2012 at 11:53 UTC
    but after you return all the code after is ignored

      but after you return all the code after is ignored

      Yes, this is the yoke ;) See I started off with :P and ended with :D