[ale] Perl and $_ ?
joshy
joshy at mindspring.com
Tue Jan 12 11:12:06 EST 1999
The nice thing about Perl is that while the crazy defaults are there,
you don't have to use them if you don't want to. I can't think of any
case where you are forced to use $_ or the like. You can always use an
explicit variable if you want to. Perl is cool like that. There's
always more than one way to do things. If you are a new to the
language or, more importantly, if you are writing code that other people
will have to look at later, then you should try to avoid defaults and
magic-like things. Always use parentheses in your math expressions.
Always use brackets for your if statements. Always declare variables
with 'my' unless you really want it to be global. And use comments
whenever it would make the code clearer.
- joshy
--
because no one ever suspects
the butterfly
More information about the Ale
mailing list