>>>>> "Matt" == Matt Sergeant <mserge...@messagelabs.com> writes:
Matt> On Mon, 30 Nov 2009 18:24:12 +0000, Chris Jack wrote: >> 1) Without running it to check, what does the following program output? >> >> >> my %a = (3,2,1,0); >> >> >> for my $b (sort values %a) { >> $b += 4; >> } >> >> >> print $a{1} . "\n"; Matt> Bizarrely enough, on both my Snow Leopard machines (default perl Matt> install) this outputs: 4D Matt> Nice bug there. Lemme guess. You did this: $ perl ... type program in here ... ^D (control D) The "D" is from your control D. Common misconception. If that *wasn't* it, let me know, so I can be perplexed. :) -- 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.vox.com/ for Smalltalk and Seaside discussion