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 made so much sense when someone else pointed it out, I felt like an idiot. Tragically, it is not so. Try this: #!/usr/bin/perl -w { local($/ = undef); $/ = "0"; } print scalar <>; __END__ You will find that the input separator is "0". $/ is never localized. Beats me what is. AndrewThread Previous | Thread Next