in reply to Re: Variable scoping and globs and reference passing to subroutines!!!
in thread Variable scoping and globs and reference passing to subroutines!!!

Awesome. Thank you Sir / Madame for all your help and time.
Ran it thru my debugger and it looks such.

Lessons learnt:

Replies are listed 'Best First'.
Re^3: Variable scoping and globs and reference passing to subroutines!!!
by tilly (Archbishop) on Dec 19, 2008 at 16:02 UTC
    You misunderstand. I was advising you to not use the prototype. That is you should write:
    sub foo { # do something }
    rather than
    sub foo ($) { # do something }
    But since you have raised the issue of predeclaration, the usual practice is to pre-declare nothing and to call them with parens. For instance that is what Damian Conway recommends in Perl Best Practices. Incidentally it isn't just strict that doesn't like the bare form if no declaration has happened. If foo hasn't been declared then foo "bar"; is a syntax error. So no matter what you do, there is no reason to avoid strict.