>>>>> "Shlomi" == Shlomi Fish <shlo...@shlomifish.org> writes:

Shlomi> I also tend to avoid using "$_" (except for map/grep/etc. where
Shlomi> it is required), because it can be clobbered and devastated too
Shlomi> easily, which also makes depending on it error prone.

Well, that's interesting.  I've *never* accidentally clobbered
$_. Nearly everything that uses $_ localizes it immediately, except for
the implicit assignment to $_ during a while-reading-filehandle loop, or
being the target of a s/old/new/ operation, which I consider something
to learn properly in the first few hours of Perl because it happens so
often.

Can you give an example from your old code where you "accidentally"
clobbered $_?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to