On Aug 25, 2000 at 21:02:32 -0400, Billy Donahue twiddled the keys to say:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Fri, 25 Aug 2000, Rick Myers wrote:
> 
> > From: Rick Myers <[EMAIL PROTECTED]>
> > 
> > On Aug 24, 2000 at 23:15:15 -0500, Ken Williams twiddled the keys to say:
> > > [EMAIL PROTECTED] (Rick Myers) wrote:
> > > >
> > > >+    ++$lines while defined <FH>;
> > > 
> > > THAT's weird - what in the world is the read-only value that's being
> > > modified?  
> > 
> > It's $_.
> 
> And why is $_ read-only?

I'm clueless about the perlguts involved here, but I'm thinking
ultimately because it's global...

perl -e 'test($_) for qw/a b c/; print "OK\n"; sub test {$_=0}'
Modification of a read-only value attempted at -e line 1.

perl -e 'test($_) for qw/a b c/; print "OK\n"; sub test {local $_=0}'
OK

Rick Myers                            [EMAIL PROTECTED]
----------------------------------------------------
The Feynman Problem       1) Write down the problem.
Solving Algorithm         2) Think real hard.
                          3) Write down the answer.

Reply via email to