Re: Error puzzler

2006-09-15 Thread Michael G Schwern
John Douglas Porter wrote: > Peter Scott <[EMAIL PROTECTED]> wrote: >> The documentation is clear that <> doesn't >> localize $_. Why not? >> Just so that if someone wanted to get at the last >> value after the loop they could do it without an extra variable? > > With all this talk of local $_, I

Re: Error puzzler

2006-09-15 Thread John Douglas Porter
Peter Scott <[EMAIL PROTECTED]> wrote: > The documentation is clear that <> doesn't > localize $_. Why not? > Just so that if someone wanted to get at the last > value after the loop they could do it without an extra variable? With all this talk of local $_, I feel compelled to point out an insi

Re: Error puzzler

2006-09-15 Thread Peter Scott
On Fri, 15 Sep 2006 01:03:18 +0200, Georg Moritz wrote: > The error is thrown at the moment the <> oprator tries to assign to $_, > which is an alias to a constant - the '1'. > > Common pitfall ;-) I know it's a pitfall, I put it in a chapter called "Perl Pitfalls" in my first book :-) It's just