From rory.macdonald at gmail.com Tue May 8 01:58:54 2007 From: rory.macdonald at gmail.com (Rory Macdonald) Date: Tue, 8 May 2007 09:58:54 +0100 Subject: [Edinburgh-pm] Tomorrow night... and stuff Message-ID: Hi, Tomorrow is 2nd Wed of the month. I will be running late, but hope to be there for about 8:30. As you may know, we will have some of the Birmingham guys up to visit us again this summer and they are looking to do a couple of short talks. Just a reminder, if any ed.pm bods have perl-related work or thoughts they might like to share, it would be good to have some local contribution. There is no date scheduled yet for Birmingham's visit - although it will likely/hopefully piggyback on the back of an edlug evening presentation. Also, for anyone interested, here is a link to the latest O'Reilly User Group newsletter. http://www.richplum.co.uk/oreilly/0407.pdf There is also a new book review on our site. http://edinburgh.pm.org/book-reviews/perl-hacks.html On the subject of book reviews, if you would like to review a book then just let me know the title and publisher and I'll get a copy to you. The deal is that in return for a 'timely' review of the book, you get to keep it. Rory From asmith9983 at gmail.com Fri May 25 05:14:10 2007 From: asmith9983 at gmail.com (asmith9983 at gmail.com) Date: Fri, 25 May 2007 13:14:10 +0100 (BST) Subject: [Edinburgh-pm] A little help with references Message-ID: Hi folks I'm still continuing my Perl revision and verifying I understand how it works with working examples. I'm having trouble with the one-liners below, They should print the file name followed immediately by the file size between ":" :- This doesn't work :- perl -e ' @files=<*>;foreach (@files){$fs=\(stat $_);;print "$_:${fs[7]}:\n";}' but this does:- perl -e ' @files=<*>;foreach (@files){@fstat=stat $_;$fs=\@fstat;print "$_:${fstat[7]}:\n";}' The code is essentially the same on both lines. In the first example I was trying to replace the @fstat variable of the second,with a reference to an anonymous list but with no intermediate variables apart from the reference. I'm obviously missing something vital, so any hints would be appreciated. -- Andrew From perl at minty.org Fri May 25 05:47:20 2007 From: perl at minty.org (Murray) Date: Fri, 25 May 2007 13:47:20 +0100 Subject: [Edinburgh-pm] A little help with references In-Reply-To: References: Message-ID: <20070525124720.GC7627@minty.org> \(1,2,3) is actually (\1, \2, \3) \@array is a ref to @array; So these would work: perl -e ' @files=<*>;foreach (@files){@{$fs}=stat $_;print "$_:$fs->[7]:\n";}'; perl -e ' @files=<*>;foreach (@files){$fs=[stat $_];print "$_:$fs->[7]:\n";}'; But you could also cut this down to: perl -e 'foreach (<*>){$fs=[stat $_];print "$_:$fs->[7]:\n";}'; or perl -e 'foreach (<*>){print "$_:", (stat $_)[7], "\n";}' Data::Dumper is your friend here. perl -MData::Dumper -e 'print Dumper \(1,2,3)' perl -MData::Dumper -e 'print Dumper [1,2,3]' perl -MData::Dumper -e '@array = (1,2,3) ; print Dumper \@array' General Data::Dumper rule: if you are calling Data::Dumper::Dumper with an array or hash, prefix with a \ is probably a good idea. M. From robrwo at gmail.com Sat May 26 09:47:04 2007 From: robrwo at gmail.com (Robert Rothenberg) Date: Sat, 26 May 2007 17:47:04 +0100 Subject: [Edinburgh-pm] Alternative venue for the summer Message-ID: <46586488.8080104@gmail.com> Is anyone up for a re-run of last summer's Perl Monger picnic on Calton Hill? From perl at minty.org Sun May 27 03:47:50 2007 From: perl at minty.org (Murray) Date: Sun, 27 May 2007 11:47:50 +0100 Subject: [Edinburgh-pm] Alternative venue for the summer In-Reply-To: <46586488.8080104@gmail.com> References: <46586488.8080104@gmail.com> Message-ID: <20070527104749.GE7627@minty.org> On Sat, May 26, 2007 at 05:47:04PM +0100, Robert Rothenberg wrote: > Is anyone up for a re-run of last summer's Perl Monger picnic on Calton Hill? $_++ if $next_meeting eq '2007-06-13'; From anthony at randell.org Mon May 28 06:40:50 2007 From: anthony at randell.org (mailbox@randell.org) Date: Mon, 28 May 2007 13:40:50 +0000 (UTC) Subject: [Edinburgh-pm] Alternative venue for the summer Message-ID: <17365625.1180359650401.JavaMail.?@fh1037.dia.cp.net> I'm keen. I missed last years - assume it was bring a plate/bottle and book? From perl at minty.org Mon May 28 13:56:49 2007 From: perl at minty.org (Murray) Date: Mon, 28 May 2007 21:56:49 +0100 Subject: [Edinburgh-pm] Alternative venue for the summer In-Reply-To: <17365625.1180359650401.JavaMail.?@fh1037.dia.cp.net> References: <17365625.1180359650401.JavaMail.?@fh1037.dia.cp.net> Message-ID: <20070528205648.GK7627@minty.org> On Mon, May 28, 2007 at 01:40:50PM +0000, mailbox at randell.org wrote: > I'm keen. I missed last years - assume it was bring a plate/bottle and > book? Other optionals being a blanket and preferred source of musical accompaniment. Anyone else game for attempting cocktails? From asmith9983 at gmail.com Mon May 28 22:33:52 2007 From: asmith9983 at gmail.com (asmith9983 at gmail.com) Date: Tue, 29 May 2007 06:33:52 +0100 (BST) Subject: [Edinburgh-pm] Alternative venue for the summer In-Reply-To: <20070528205648.GK7627@minty.org> References: <17365625.1180359650401.JavaMail.?@fh1037.dia.cp.net> <20070528205648.GK7627@minty.org> Message-ID: Hi All programs I think are buggy. Murray's little but of logic on meeting date missed out something like :- lc($weather) =~ /(dry|sunny|calm)/ I assume plan B is the Guildford Arms, but what triggers that, and how do we know we've not just missed each other somewhere on Calton Hill or on route? Rory will no doubt email to say he'll be late!! Maybe somebody could be the leader with a mobile that stragglers could consult ? -- Andrew On Mon, 28 May 2007, Murray wrote: > On Mon, May 28, 2007 at 01:40:50PM +0000, mailbox at randell.org wrote: >> I'm keen. I missed last years - assume it was bring a plate/bottle and >> book? > > Other optionals being a blanket and preferred source of musical > accompaniment. Anyone else game for attempting cocktails? > _______________________________________________ > Edinburgh-pm mailing list > Edinburgh-pm at pm.org > http://mail.pm.org/mailman/listinfo/edinburgh-pm > From perl at minty.org Tue May 29 02:28:27 2007 From: perl at minty.org (Murray) Date: Tue, 29 May 2007 10:28:27 +0100 Subject: [Edinburgh-pm] Alternative venue for the summer In-Reply-To: References: <17365625.1180359650401.JavaMail.?@fh1037.dia.cp.net> <20070528205648.GK7627@minty.org> Message-ID: <20070529092827.GP7627@minty.org> On Tue, May 29, 2007 at 06:33:52AM +0100, asmith9983 at gmail.com wrote: > Maybe somebody could be the leader with a mobile that stragglers could consult Aaron, Rob.com, Rob.co.uk and Nick have my mobile number. I'll email Andrew in a mo. Anyone thinking they might turn up is most welcome to email and get my number by return. M. From perl at aaroncrane.co.uk Tue May 29 03:57:02 2007 From: perl at aaroncrane.co.uk (Aaron Crane) Date: Tue, 29 May 2007 11:57:02 +0100 Subject: [Edinburgh-pm] Alternative venue for the summer In-Reply-To: <46586488.8080104@gmail.com> References: <46586488.8080104@gmail.com> Message-ID: <20070529105702.GC7039@aaroncrane.co.uk> Robert Rothenberg writes: > Is anyone up for a re-run of last summer's Perl Monger picnic on Calton > Hill? I definitely enjoyed last year's. Count me in. -- Aaron Crane From robrwo at gmail.com Tue May 29 07:51:23 2007 From: robrwo at gmail.com (Robert Rothenberg) Date: Tue, 29 May 2007 15:51:23 +0100 Subject: [Edinburgh-pm] Alternative venue for the summer In-Reply-To: <20070529105702.GC7039@aaroncrane.co.uk> References: <46586488.8080104@gmail.com> <20070529105702.GC7039@aaroncrane.co.uk> Message-ID: <465C3DEB.2060909@gmail.com> Do we set this for the June meeting, or a different date? On 29/05/07 11:57 Aaron Crane wrote: > Robert Rothenberg writes: >> Is anyone up for a re-run of last summer's Perl Monger picnic on Calton >> Hill? > > I definitely enjoyed last year's. Count me in. >