note
BrowserUk
<blockquote><i>That's why you should never use $a and $b as variable names.</i></blockquote>
<p>Personally, I think instead of promoting a blanket ban on using lexical $a & $b -- which 9x% of code can use safely and usefully -- it would be better to change the documentation to show the use of: <c>
my @sorted = sort{ $::a <=> $::b } @array;
</c>
<P>which avoids the problem and clearly marks out the special usage of these variables for [sort].
<P>A simple change that would easily fix the problem.
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'</div>
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". [http://www.bbc.co.uk/news/business-33609566|I knew I was on the right track :)]</div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice. </div>
[http://www.theregister.co.uk/2015/01/19/got_bugs_got_anger_just_get_them_out_says_linus_torvalds/|I'm with torvalds on this] [http://vimeo.com/110554082|Agile (and TDD) debunked] [http://www.theregister.co.uk/2015/06/18/brendan_eich_announces_webassembly/|I told'em LLVM was the way to go. But did they listen!]
</font>
</div></div>
1137627
1137630