On 11-08-26 03:08 PM, Rob Dixon wrote:
As an aside, the same applies to the common warning against using the
global values $a and $b 'because they are used by sort'. Once again,
sort localizes these variables within the comparison code so there is
very little chance of inadvertently modifying their values.

The warning about $a and $b is not because Perl will get confused, it's because the people reading it will. And unless it's part of a well-known mathematical formula, one shouldn't use single-letter variables. Use a more meaningful name instead.


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

"Make something worthwhile."  -- Dear Hunter

--
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