[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

scared of our()



perl -Mstrict -wle 'our $foo = 1; print $foo; package Foo; print $foo'

One might expect that to print 1 twice, or to die.  It does neither.  It
first prints $main::foo, then $Foo::foo.  I don't like this.  It scares me.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


Follow-Ups from:
Larry Wall <larry@wall.org>
Gurusamy Sarathy <gsar@ActiveState.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]