From mark at dreamzpace.com Mon Jan 6 09:46:14 2003 From: mark at dreamzpace.com (Mark Pors) Date: Mon Aug 2 21:22:57 2004 Subject: [Athens-pm] perl drink Message-ID: <3E19A4C6.9040303@dreamzpace.com> Hi all, A verry happy new year! That we may code more perl and less other stuff. How about a newyears drink on Wednesday? I propose to go again to: IPPOPOTAMOS Delfon St. (near Skoufa, Kolonaki) If you have problems finding it, please call me: 0946718563 Around 20:00 till late Mark From pjlees at ics.forth.gr Fri Jan 17 06:39:57 2003 From: pjlees at ics.forth.gr (Philip Lees) Date: Mon Aug 2 21:22:57 2004 Subject: [Athens-pm] Regular expression for testing prime numbers Message-ID: <001601c2be25$8b07d950$44be5b8b@ics.forth.gr> Hello, fellow Perlers. Check out this amazing one liner for checking whether a number is prime. It took me an hour before I even started to understand it: print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/ This is by Abigail, who is something of a legend in the Perl community. Philip -- Philip Lees Working Group on Cardiology ICS-FORTH, Science and Technology Park of Crete Vassilika Vouton, P.O. Box 1385, GR 711 10 Heraklion, Crete, GREECE tel.: +30-2810-391680, fax: +30-2810-391601, e-mail: pjlees@ics.forth.gr 'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer