Re: [Gllug-Social] [ANNOUNCE] London.pm December social 2009-12-03, The Prince Bonaparte, W2 5BE

2009-11-30 Thread Lesley Binks
On Sun, Nov 29, 2009 at 04:58:06PM +, Edmund von der Burg wrote: 2009/11/28 Mark Fowler m...@twoshortplanks.com: Pub socials start essentially after people are done with work. For those who are CFT enabled the social essentially starts with the dim sum lunch, followed by some sort of

Perl Christmas Quiz 2009

2009-11-30 Thread Chris Jack
Seeing as last year's quiz was mildly popular, I thought I'd do another one. I've changed the mix of questions based on what people submitted answers to last year - it also arguably a little more educational this time around. Any feedback about the quiz, either private or public is welcome.

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Simon Wistow
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack said: 6) What is the name of the official Soft Toy Camel of the London Perl Mongers? Bonus mark if you own one. I bet only 2 people get this correct although I suspect several people will get the answer the OP was thinking of.

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Dave Cross
On 30/11/09 18:24, Chris Jack wrote: In-Reply-To: mailman.10014.1258641251.36522.london...@london.pm.org References: mailman.10014.1258641251.36522.london...@london.pm.org Grrr 1) Without running it to check, what does the following program output? my %a = (3,2,1,0);

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Simon Wistow
On Mon, Nov 30, 2009 at 07:38:31PM +, Dave Cross said: According to the Beanie Baby people, he's called Niles. According to us (and the 2001 leadership election ballot papers) she's called Amelia. [ SPOILER SPACE ] Actually - there are two

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Randal L. Schwartz
Dave == Dave Cross d...@dave.org.uk writes: 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; Dave Without running it, I'd say 4. Having now run it, I'm glad that's what I said

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Paul Johnson
On Mon, Nov 30, 2009 at 12:14:21PM -0800, Randal L. Schwartz wrote: Dave == Dave Cross d...@dave.org.uk writes: 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;

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Abigail
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote: Seeing as last year's quiz was mildly popular, I thought I'd do another one. I've changed the mix of questions based on what people submitted answers to last year - it also arguably a little more educational this time around. Any

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Graham Barr
On Nov 30, 2009, at 3:17 PM, Graham Barr wrote: On Nov 30, 2009, at 2:14 PM, Randal L. Schwartz wrote: Dave == Dave Cross d...@dave.org.uk writes: 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;

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Graham Barr
On Nov 30, 2009, at 2:14 PM, Randal L. Schwartz wrote: Dave == Dave Cross d...@dave.org.uk writes: 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; Dave Without running it,

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Abigail
On Mon, Nov 30, 2009 at 03:22:04PM -0600, Graham Barr wrote: On Nov 30, 2009, at 3:17 PM, Graham Barr wrote: On Nov 30, 2009, at 2:14 PM, Randal L. Schwartz wrote: Dave == Dave Cross d...@dave.org.uk writes: 1) Without running it to check, what does the following program

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Martin A. Brooks
Merry Ex-Mass. A sysadmin and pedant's point of view On 30/11/2009 18:24, Chris Jack wrote: 1) Without running it to check, what does the following program output? Something like: bash: syntax error near unexpected token '(' Don't assume my default interpreter is your default

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Randal L. Schwartz
Graham == Graham Barr gb...@pobox.com writes: Graham I meant to add that this change to sort was added to 5.6.0. So to Graham answer your question it was nearly a decade ago :-) Yeah, well it wasn't true when I was running Perl 2.0 on the One True Unix under the Real Bourne Shell :-) --

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Dave Hodgkinson
On 30 Nov 2009, at 18:24, Chris Jack wrote: Seeing as last year's quiz was mildly popular, Bonus question: How many people will be mildly irritated by starting a new thread with a Reply-to: to an existing one? -- Dave HodgkinsonMSN: daveh...@hotmail.com

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Avleen Vig
On Nov 30, 2009, at 14:43, Dave Hodgkinson daveh...@gmail.com wrote: On 30 Nov 2009, at 18:24, Chris Jack wrote: Seeing as last year's quiz was mildly popular, Bonus question: How many people will be mildly irritated by starting a new thread with a Reply-to: to an existing one? Answer:

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Roger Burton West
On Mon, Nov 30, 2009 at 10:43:19PM +, Dave Hodgkinson wrote: How many people will be mildly irritated by starting a new thread with a Reply-to: to an existing one? Meh, judging by the headers he's probably never used a threaded email client so has no reason to know any better. No point in

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Ask Bjørn Hansen
On Nov 30, 2009, at 13:21, Martin A. Brooks wrote: A sysadmin and pedant's point of view I take it sysadmins are too angry and bitter to understand or care for the holiday[1] spirit I'm sure the quiz was sent in. Why don't you go change someones password? - ask [1]

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Graham Barr
On Nov 30, 2009, at 3:51 PM, Abigail wrote: I meant to add that this change to sort was added to 5.6.0. So to answer your question it was nearly a decade ago :-) Which was the same release where values() returned aliases instead of copies. Ah, you are right. sort was before that. the

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Chris Jack
Abigail abig...@abigail.be wrote On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote: 7) Write a one line program that takes a non-negative integer as an argument and prints the square root when the answer's an integer. Restrictions: the perl line should be a regular

Re: Perl Christmas Quiz 2009

2009-11-30 Thread James Coupe
Chris Jack chris_j...@msn.com wrote: Abigail abig...@abigail.be wrote On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote: 7) Write a one line program that takes a non-negative integer as an argument and prints the square root when the answer's an integer. Restrictions: the perl

Re: Perl Christmas Quiz 2009

2009-11-30 Thread James Coupe
James Coupe ja...@zephyr.org.uk wrote: $ perl -e '(1 x $ARGV[0]) =~ m/^(1*)((??{$1x(length($1)-1)})$)(?(2)(?{print length $1}))/' 4 2 I don't recommend trying it on large numbers. 1024 was about as high as my boredom threshold could tolerate on this box. Oh, it gets better if I do something

Re: Perl Christmas Quiz 2009

2009-11-30 Thread Ruud H.G. van Tol
Abigail wrote: On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote: 7) Write a one line program that takes a non-negative integer as an argument and prints the square root when the answer's an integer. Restrictions: the perl line should be a regular expression. Just a regular