On Sat, Jan 05, 2002 at 01:48:13AM +0000, robin szemeti wrote: > <wild guess> > my($id) declares the variable at compile time regardless of the conditional, > saving a likkle space for it .. and satisfying the scoping of 'strict' > > the conditional prevents initialisation of the variable at run time ... thus > provoking the behaviour observed ... > </wild guess>
Spot on! There's a vaguely similar discrepancy with code like: my $x=23 for 1; print $x; where the variable goes out of scope (at run time) while its lexical scope still exists. All rather messy... .robin. -- "Images have limits. i am grateful for that." --Catherine Milne
