From piers at ompa.net Mon Sep 16 14:51:52 2002 From: piers at ompa.net (Piers Harding) Date: Thu Aug 5 00:24:13 2004 Subject: Wellington Perlmongers In-Reply-To: <5FA042F680739D44951B00FED8BE1A7D06208D@dasher.webdom1.web.co.nz>; from StephenJ@web.co.nz on Tue, Aug 20, 2002 at 01:59:08PM +1200 References: <5FA042F680739D44951B00FED8BE1A7D06208D@dasher.webdom1.web.co.nz> Message-ID: <20020916205152.B6528@gnu> Hi Guys - I listen into the melbourne.pm list, and they seem to share lots of ideas, and regularily publish work/articles etc. to the list. Are people on this list interested in the same sort of thing, as it would be good to try and inject some life back into it? Also, as a kiwi overseas, it would be nice to have some banter with the Perl community back home. Cheers. Piers Harding On Tue, Aug 20, 2002 at 01:59:08PM +1200, Stephen Judd wrote: > Don Jones wrote: > > I was wondering if the Wellington Perlmongers group is still > > active, the > > content on the site looks a little bit dated. Are there > > likely to be meetings > > in the future? > > Erm - it has been in, ah, abeyance for some months, owing to lack of interest in meetings. However, the recent return of Grant McLean strikes me as an excellent opportunity to revive meetings. Takers, anyone? > > stephen From Grantm at web.co.nz Wed Sep 25 04:43:03 2002 From: Grantm at web.co.nz (Grant McLean) Date: Thu Aug 5 00:24:13 2004 Subject: Perl tip of the day (was Re: Wellington Perlmongers) Message-ID: <5FA042F680739D44951B00FED8BE1A7D05DBC1@dasher.webdom1.web.co.nz> Hi Piers Just to let you know we're not all ignoring you. I couldn't reply straight away since I was writing Tcl code :-( I'm all in favour of a bit more 'banter' on the list. What would you like to talk about? Perhaps since no one is asking questions, I could kick off with an unsolicited answer... Today's message is brought to you be the command line argument '-l'. The problem: I want to extract a list of subroutine names from a Perl .pm file. The solution: perl -n -e '/^\s*sub\s+(\w+)/ && print "$1\n"' filenames Unfortunately, although that works nicely on Unix, it doesn't work on Windows. At least not with the standard Windows command shell which only recognises double quotes. One alternative is to use the 'qq' double quoting operator: perl -n -e "/^\s*sub\s+(\w+)/ && print qq($1\n)" filenames But my tip of the day is to dispense with the quotes and use the '-l' option to append a linefeed onto every print: perl -nle "/^\s*sub\s+(\w+)/ && print $1" filenames Which is less typing too. Anyone else have a tip? Regards Grant > -----Original Message----- > From: Piers Harding [mailto:piers@ompa.net] > Subject: Re: Wellington Perlmongers > > > Hi Guys - I listen into the melbourne.pm list, and they seem to share > lots of ideas, and regularily publish work/articles etc. to the list. > Are people on this list interested in the same sort of thing, as it > would be good to try and inject some life back into it? > > Also, as a kiwi overseas, it would be nice to have some > banter with the > Perl community back home. > > Cheers. > > Piers Harding From piers at ompa.net Wed Sep 25 11:31:59 2002 From: piers at ompa.net (Piers Harding) Date: Thu Aug 5 00:24:13 2004 Subject: Perl tip of the day (was Re: Wellington Perlmongers) In-Reply-To: <5FA042F680739D44951B00FED8BE1A7D05DBC1@dasher.webdom1.web.co.nz>; from Grantm@web.co.nz on Wed, Sep 25, 2002 at 09:43:03PM +1200 References: <5FA042F680739D44951B00FED8BE1A7D05DBC1@dasher.webdom1.web.co.nz> Message-ID: <20020925173159.B21400@gnu> Excellent - altho I don't ( fortunately ) have the problem of using win32. :-) I have written a couple of articles lately, and attended OSCON so perhaps people might be intereseted in such subjects as Perl based HTTP proxies, embedding Perl in Daemons, and Perl and SAP R/3. My blitherings are at: http://www.piersharding.com. Cheers. On Wed, Sep 25, 2002 at 09:43:03PM +1200, Grant McLean wrote: > Hi Piers > > Just to let you know we're not all ignoring you. I couldn't reply > straight away since I was writing Tcl code :-( > > I'm all in favour of a bit more 'banter' on the list. What would > you like to talk about? > > Perhaps since no one is asking questions, I could kick off with an > unsolicited answer... > > > Today's message is brought to you be the command line argument '-l'. > > The problem: > I want to extract a list of subroutine names from a Perl .pm file. > > The solution: > > perl -n -e '/^\s*sub\s+(\w+)/ && print "$1\n"' filenames > > Unfortunately, although that works nicely on Unix, it doesn't work > on Windows. At least not with the standard Windows command shell > which only recognises double quotes. One alternative is to use > the 'qq' double quoting operator: > > perl -n -e "/^\s*sub\s+(\w+)/ && print qq($1\n)" filenames > > But my tip of the day is to dispense with the quotes and use the > '-l' option to append a linefeed onto every print: > > perl -nle "/^\s*sub\s+(\w+)/ && print $1" filenames > > Which is less typing too. > > Anyone else have a tip? > > Regards > Grant > > > > -----Original Message----- > > From: Piers Harding [mailto:piers@ompa.net] > > Subject: Re: Wellington Perlmongers > > > > > > Hi Guys - I listen into the melbourne.pm list, and they seem to share > > lots of ideas, and regularily publish work/articles etc. to the list. > > Are people on this list interested in the same sort of thing, as it > > would be good to try and inject some life back into it? > > > > Also, as a kiwi overseas, it would be nice to have some > > banter with the > > Perl community back home. > > > > Cheers. > > > > Piers Harding From don at gamma.net.nz Mon Sep 30 05:54:28 2002 From: don at gamma.net.nz (Don Jones) Date: Thu Aug 5 00:24:13 2004 Subject: Perl tip of the day (was Re: Wellington Perlmongers) In-Reply-To: <5FA042F680739D44951B00FED8BE1A7D05DBC1@dasher.webdom1.web.co.nz> References: <5FA042F680739D44951B00FED8BE1A7D05DBC1@dasher.webdom1.web.co.nz> Message-ID: <20020930105428.M38052@gamma.net.nz> Well given the level of experience and competance I fear my tips will be a little amature in comparison - but I'll have a go all the same. Heres one I use often when I need to do a bunch of reverse lookups on a class C $ perl -e 'for(1..254) {system "host 192.168.1.$_"}' anyone got any other good one liners? Don Jones -- "Intellectual Property" : a tool that the dinosaurs use to make sure there are no mammals in the future. - Lawrence Lessig From piers at ompa.net Mon Sep 30 07:17:13 2002 From: piers at ompa.net (Piers Harding) Date: Thu Aug 5 00:24:14 2004 Subject: Perl tip of the day (was Re: Wellington Perlmongers) In-Reply-To: <20020930105428.M38052@gamma.net.nz>; from don@gamma.net.nz on Mon, Sep 30, 2002 at 10:54:28PM +1200 References: <5FA042F680739D44951B00FED8BE1A7D05DBC1@dasher.webdom1.web.co.nz> <20020930105428.M38052@gamma.net.nz> Message-ID: <20020930131713.C9411@gnu> Cool - I like your sig too. Cheers. On Mon, Sep 30, 2002 at 10:54:28PM +1200, Don Jones wrote: > Well given the level of experience and competance I fear my tips will be a > little amature in comparison - but I'll have a go all the same. > > Heres one I use often when I need to do a bunch of reverse lookups on a class C > > $ perl -e 'for(1..254) {system "host 192.168.1.$_"}' > > anyone got any other good one liners? > > Don Jones > > -- > "Intellectual Property" : a tool that the dinosaurs use to make sure > there are no mammals in the future. - Lawrence Lessig