in reply to Re: Why do we need $a and $b to be special?
in thread Why do we need $a and $b to be special?

IIRC, the original reason for $a and $b is that they were much faster then using @_.

I thought the original reason was that sort with a block was in perl4 and there were no subroutines at that time, but I might be wrong.

  • Comment on Re^2: Why do we need $a and $b to be special?

Replies are listed 'Best First'.
Re^3: Why do we need $a and $b to be special?
by chromatic (Archbishop) on Jul 30, 2004 at 16:27 UTC

    Even Perl 1 had subroutines. I don't have time to look at how sort worked then, but I do remember having to say somethign like do &subname to make subroutine calls in Perl 1.

    Of course, now that I post, I immediately realize you probably meant didn't have lexicals, which is true.