On Mon, Nov 15, 1999 at 07:01:44PM -0800, Tom Phoenix wrote: > On Sun, 14 Nov 1999, Andrew Pimlott wrote: > > > A coworker accidentally did: > > > > { > > local($/ = undef); > > ... > > } > > > > This did not localize $/ . I don't know what it did do. > > It looks to me as if it did localize $/ -- but only _after_ storing undef > into it. Oops! > That was my guess, too, but further tests don't seem to be consistent with that conclusion: #!perl -w $x = 'a'; print "1: $x\n"; { local($x = undef); print "2: $x\n"; $x = 'b'; print "3: $x\n"; } print "4: $x\n"; --- 1: a Use of uninitialized value at foo line 9. 2: 3: b 4: b -- If $x were being localized at all, then 4 would be 'a', rather than 'b'. RonaldThread Previous