Re: Cool/useful short examples of Perl?

2011-06-08 Thread Sue Spence
This distaste is not really limited to Germans or C programmers in my experience. Anything more complicated than holiday.picnic() unless raining; will ideally not appear in any code that I am required to inspect/support/maintain. On Wednesday, 8 June 2011, Richard Foley richard.fo...@rfi.net

4th edition

2011-06-08 Thread Steve Mynott
Apparently out in October! I assume Programming Perl6 will be out in 2021 by which time Centos 7 will have 5.14. -- Steve Mynott st...@gruntling.com

Re: 4th edition

2011-06-08 Thread Dave Cross
On 06/08/2011 09:41 AM, Steve Mynott wrote: Apparently out in October! It's on the O'Reilly site, so it must be true :) http://oreilly.com/catalog/9780596004927/ Dave...

Re: Someone needs to take jwz aside...

2011-06-08 Thread Paul Makepeace
On Wed, Jun 8, 2011 at 11:21, David Cantrell da...@cantrell.org.uk wrote: Of course, it's possible that the Comprehensive Python Archive Network or similar for ruby/javascript/java/C/whatever does exist but I just can't find it.  But then, if I can't find it, it's not much use. (If you were a

Re: Someone needs to take jwz aside...

2011-06-08 Thread Denny
On Wed, 2011-06-08 at 12:07 +0100, Paul Makepeace wrote: On Wed, Jun 8, 2011 at 11:21, David Cantrell da...@cantrell.org.uk wrote: Of course, it's possible that the Comprehensive Python Archive Network or similar for ruby/javascript/java/C/whatever does exist but I just can't find it. But

Re: Someone needs to take jwz aside...

2011-06-08 Thread Peter Edwards
On Wed, 8 Jun 2011, David Cantrell wrote: It's the lack of a CPAN-a-like for any other language that keeps me coming back to perl. Of course, it's possible that the Comprehensive Python Archive Network or similar for ruby/javascript/java/C/whatever does exist but I just can't find it.

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Tom Hukins
On Wed, Jun 08, 2011 at 02:00:41PM +0200, Abigail wrote: I'd rather go for sacking people that don't know the difference between if (something) { ... } and unless (!something) { ... } It's sunny outside and pubs are open: I can think of worse times to lose my job. Or does

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Paul Makepeace
On Wed, Jun 8, 2011 at 13:17, Tom Hukins t...@eborcom.com wrote: On Wed, Jun 08, 2011 at 02:00:41PM +0200, Abigail wrote: I'd rather go for sacking people that don't know the difference between     if (something) { ... } and     unless (!something) { ... } It's sunny outside and pubs

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Peter Corlett
On 8 Jun 2011, at 13:00, Abigail wrote: [...] I'd rather go for sacking people that don't know the difference between if (something) { ... } and unless (!something) { ... } Or does everyone think they are always equivalent? Is this a trick question? I would expect it to be

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Roger Burton West
On Wed, Jun 08, 2011 at 01:41:29PM +0100, Paul Makepeace wrote: $ perl -le 'print $_ == !!$_ ? , $_ == !!$_ ? yes : no for (-1, 0, 1, 2, undef)' -1 == !!-1 ? no 0 == !!0 ? yes 1 == !!1 ? yes 2 == !!2 ? no == !! ? yes Might as well add lua, since I'm trying to learn it at the moment (and

Re: Cool/useful short examples of Perl?

2011-06-08 Thread David Matthewman
On 8 Jun 2011, at 13:17, Tom Hukins wrote: On Wed, Jun 08, 2011 at 02:00:41PM +0200, Abigail wrote: I'd rather go for sacking people that don't know the difference between if (something) { ... } and unless (!something) { ... } It's sunny outside and pubs are open: I can

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Kaoru
On Wed, Jun 8, 2011 at 1:41 PM, Paul Makepeace pa...@paulm.com wrote: $ perl -le 'print $_ == !!$_ ? , $_ == !!$_ ? yes : no for (-1, 0, 1, 2, undef)' -1 == !!-1 ? no 0 == !!0 ? yes 1 == !!1 ? yes 2 == !!2 ? no  == !! ? yes Whether they are equal according to == shouldn't matter here,

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Chris Jack
: not available Type: application/pgp-signature Size: 490 bytes Desc: This is a digitally signed message part Url : http://london.pm.org/pipermail/london.pm/attachments/20110608/5c15a72b/attachment-0001.pgp -- Message: 3 Date: Wed, 8 Jun 2011 12:19:15 +0100

Re: Cool/useful short examples of Perl?

2011-06-08 Thread David Matthewman
On 8 Jun 2011, at 13:41, Paul Makepeace wrote: On Wed, Jun 8, 2011 at 13:17, Tom Hukins t...@eborcom.com wrote: On Wed, Jun 08, 2011 at 02:00:41PM +0200, Abigail wrote: I'd rather go for sacking people that don't know the difference between if (something) { ... } and unless

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Paul Makepeace
On Wed, Jun 8, 2011 at 14:15, Kaoru ka...@slackwise.net wrote: On Wed, Jun 8, 2011 at 1:41 PM, Paul Makepeace pa...@paulm.com wrote: $ perl -le 'print $_ == !!$_ ? , $_ == !!$_ ? yes : no for (-1, 0, 1, 2, undef)' -1 == !!-1 ? no 0 == !!0 ? yes 1 == !!1 ? yes 2 == !!2 ? no  == !! ? yes

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Matt Lawrence
On 08/06/11 13:41, Paul Makepeace wrote: On Wed, Jun 8, 2011 at 13:17, Tom Hukinst...@eborcom.com wrote: On Wed, Jun 08, 2011 at 02:00:41PM +0200, Abigail wrote: I'd rather go for sacking people that don't know the difference between if (something) { ... } and unless (!something)

Re: Someone needs to take jwz aside...

2011-06-08 Thread Matt Sergeant
Hakim Cassimally wrote: While Javascript-the-language is lovely (as you say, better in some respects, worse in others, than Perl), that's only one part of the story. I've not followed Javascript-the-platform that closely (i.e. anything much beyond jQuery) - what's your experience been like,

Re: Someone needs to take jwz aside...

2011-06-08 Thread Matt Sergeant
David Cantrell wrote: It's the lack of a CPAN-a-like for any other language that keeps me coming back to perl. Of course, it's possible that the Comprehensive Python Archive Network or similar for ruby/javascript/java/C/whatever does exist but I just can't find it. But then, if I can't find

RE: Cool/useful short examples of Perl?

2011-06-08 Thread Chris Jack
Apologies for including the top half of the digest. Chris

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Philip Newton
On Wed, Jun 8, 2011 at 15:37, Matt Lawrence matt.lawre...@virgin.net wrote: Perl's canonical true and false are 1 and '' respectively Is that so? How would one find that out? Dump-ing 4==4 and 4==5 with Devel::Peek implies to me that true and false are PVNVs with integer, floating-point, and

Re: Cool/useful short examples of Perl?

2011-06-08 Thread David Matthewman
On 8 Jun 2011, at 13:17, Tom Hukins wrote: On Wed, Jun 08, 2011 at 02:00:41PM +0200, Abigail wrote: I'd rather go for sacking people that don't know the difference between if (something) { ... } and unless (!something) { ... } It's sunny outside and pubs are open: I can

Re: Cool/useful short examples of Perl?

2011-06-08 Thread Ruud H.G. van Tol
On 30 May 2011 11:40, Leo Lapworthl...@cuckoo.org wrote: I'm working on http://learn.perl.org/ and I'd like to have a few rotating example of what can be done with Perl on the home page. # see also perlvar: $BASETIME { my $t0 = time; sub elapsed { time - $t0 } } -- Ruud