Scope of variables in a function
Andrew Beverley
andy at andybev.com
Sat Jun 1 21:40:19 BST 2013
On Sat, 2013-06-01 at 21:08 +0100, Dominic Thoreau wrote:
> On 1 June 2013 20:59, Andrew Beverley <andy at andybev.com> wrote:
>
> > On Sat, 2013-06-01 at 20:33 +0100, Anthony Lucas wrote:
> > > Relying on its _contents_ is what you shouldn't be doing. There' a
> > > difference.
> >
> > Okay, in which case I reckon there should be a warning when trying to
> > use the contents, when the declaration hasn't happened because of the
> > condition ;-)
> >
> Although the code you published didn't have 'use warnings;' on it, so I'm
> suspecting most people thought it wouldn't be there (silly, I know)
Yes, I should have explicitly stated that. I've already learnt the
lesson of not putting that in my code ;-)
More information about the london.pm
mailing list