From jarich at perltraining.com.au Wed Jun 7 20:16:49 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Thu, 08 Jun 2006 13:16:49 +1000 Subject: [Canberra-pm] Early bird special on Perl courses runs out tomorrow Message-ID: <448796A1.70400@perltraining.com.au> G'day everyone, Tomorrow is the last day to register for our July training courses in Canberra and still be eligible for your free book! Course Date -------------------------------------------------------- Programming Perl 4th - 7th July 2006 Object Oriented Perl 11th - 12th July 2006 Databases and Perl 13th - 15th July 2006 Web Development with Perl 19th - 20th July 2006 Perl Security 21st July 2006 Don't forget to mention Canberra Perl Mongers to get a 5% discount off any full price course. Book on multiple courses to get a 25% off each subsequent course, with our "Bundle and Save" special. To book on these courses visit http://perltraining.com.au/bookings/Canberra.html Please don't hesitate to contact me for further information. All the best, Jacinta -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From kim at holburn.net Thu Jun 8 17:29:14 2006 From: kim at holburn.net (Kim Holburn) Date: Fri, 9 Jun 2006 10:29:14 +1000 Subject: [Canberra-pm] here document perl script Message-ID: I want to put a here document fragment of perl in a shell script. I'm sure I've done something like this before but I can't get it to work. Anyone got any ideas? #!/bin/sh /usr/bin/perl -e -- < References: Message-ID: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> Hi Kim, > I want to put a here document fragment of perl in a shell script. > I'm sure I've done something like this before but I can't get it to > work. Anyone got any ideas? > > #!/bin/sh > > > /usr/bin/perl -e -- < Kim Holburn Regards, James -- James Ring From kim at holburn.net Thu Jun 8 18:59:31 2006 From: kim at holburn.net (Kim Holburn) Date: Fri, 9 Jun 2006 11:59:31 +1000 Subject: [Canberra-pm] here document perl script In-Reply-To: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> References: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> Message-ID: <9AB2EED9-CA24-4477-A15A-457605C059B7@holburn.net> Thanks, that works. Now how do I put the results in an environment var? This doesn't work: i=`/usr/bin/perl - `< Hi Kim, > >> I want to put a here document fragment of perl in a shell script. >> I'm sure I've done something like this before but I can't get it to >> work. Anyone got any ideas? >> >> #!/bin/sh >> >> >> /usr/bin/perl -e -- < > The stuff between < input, > so you don't need the -e. I think this works: > > /usr/bin/perl - < >> Kim Holburn > > Regards, > James > -- > James Ring > > -- Kim Holburn Security Manager, National ICT Australia Ltd. Ph: +61 2 61258620 M: +61 417820641 F: +61 2 6230 6121 mailto:kim.holburn at nicta.com.au aim://kimholburn skype://kholburn - PGP Public Key on request Cacert Root Cert: http://www.cacert.org/cacert.crt Aust. Spam Act: To stop receiving mail from me: reply and let me know. Use ISO 8601 dates [YYYY-MM-DD] http://www.saqqara.demon.co.uk/ datefmt.htm Democracy imposed from without is the severest form of tyranny. -- Lloyd Biggle, Jr. Analog, Apr 1961 From sjr at jdns.org Thu Jun 8 20:26:11 2006 From: sjr at jdns.org (James Ring) Date: Fri, 9 Jun 2006 13:26:11 +1000 (EST) Subject: [Canberra-pm] here document perl script In-Reply-To: <9AB2EED9-CA24-4477-A15A-457605C059B7@holburn.net> References: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> <9AB2EED9-CA24-4477-A15A-457605C059B7@holburn.net> Message-ID: <63306.152.91.8.100.1149823571.squirrel@webmail.jdns.org> Hi Kim > Thanks, that works. Now how do I put the results in an environment var? > I now know more about Bash than I ever wanted to... but this should work: #!/bin/sh x=$( /usr/bin/perl - $@ <<'EOP' use Socket; my $ip = $ARGV[0]; my $addr = inet_aton($ip); my $name = gethostbyaddr($addr,AF_INET); my $ip2 = sprintf "%-20s", "[$ip]"; if ($name eq "") { $name = "not found"; } my $begin .= $ip2 . $name; print "$begin\n"; EOP ) echo $x The quotes around the here document name cause Bash to not perform variable substitutions within the document, so pass $@ to Perl. Putting the whole thing in x=$( ) seems to do the trick! :) Regards, James -- James Ring From andrew-pm at andrew.net.au Thu Jun 8 20:31:30 2006 From: andrew-pm at andrew.net.au (Andrew Pollock) Date: Fri, 9 Jun 2006 13:31:30 +1000 Subject: [Canberra-pm] here document perl script In-Reply-To: <63306.152.91.8.100.1149823571.squirrel@webmail.jdns.org> References: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> <9AB2EED9-CA24-4477-A15A-457605C059B7@holburn.net> <63306.152.91.8.100.1149823571.squirrel@webmail.jdns.org> Message-ID: <20060609033130.GE26859@daedalus.andrew.net.au> On Fri, Jun 09, 2006 at 01:26:11PM +1000, James Ring wrote: > Hi Kim > > > Thanks, that works. Now how do I put the results in an environment var? > > > > I now know more about Bash than I ever wanted to... but this should work: > > #!/bin/sh > > x=$( > /usr/bin/perl - $@ <<'EOP' > use Socket; > > my $ip = $ARGV[0]; > my $addr = inet_aton($ip); > my $name = gethostbyaddr($addr,AF_INET); > my $ip2 = sprintf "%-20s", "[$ip]"; > if ($name eq "") { $name = "not found"; } > my $begin .= $ip2 . $name; > print "$begin\n"; > EOP > ) > > echo $x Ye gods. At this point, you'd just stop using shell, it's clearly not the tool for the job... regards Andrew From sjr at jdns.org Thu Jun 8 20:35:06 2006 From: sjr at jdns.org (James Ring) Date: Fri, 9 Jun 2006 13:35:06 +1000 (EST) Subject: [Canberra-pm] here document perl script In-Reply-To: <20060609033130.GE26859@daedalus.andrew.net.au> References: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> <9AB2EED9-CA24-4477-A15A-457605C059B7@holburn.net> <63306.152.91.8.100.1149823571.squirrel@webmail.jdns.org> <20060609033130.GE26859@daedalus.andrew.net.au> Message-ID: <39926.152.91.8.100.1149824106.squirrel@webmail.jdns.org> > > Ye gods. At this point, you'd just stop using shell, it's clearly not the > tool for the job... Agreed... but there is some strange fascination with getting such a horrible thing to work. ;) > regards > > Andrew Regards, James -- James Ring From kim at holburn.net Thu Jun 8 20:55:22 2006 From: kim at holburn.net (Kim Holburn) Date: Fri, 9 Jun 2006 13:55:22 +1000 Subject: [Canberra-pm] here document perl script In-Reply-To: <63306.152.91.8.100.1149823571.squirrel@webmail.jdns.org> References: <62749.152.91.8.100.1149816060.squirrel@webmail.jdns.org> <9AB2EED9-CA24-4477-A15A-457605C059B7@holburn.net> <63306.152.91.8.100.1149823571.squirrel@webmail.jdns.org> Message-ID: Awesome, Thanks. On 2006 Jun 09, at 1:26 PM, James Ring wrote: > Hi Kim > >> Thanks, that works. Now how do I put the results in an >> environment var? >> > > I now know more about Bash than I ever wanted to... but this should > work: > > #!/bin/sh > > x=$( > /usr/bin/perl - $@ <<'EOP' > use Socket; > > my $ip = $ARGV[0]; > my $addr = inet_aton($ip); > my $name = gethostbyaddr($addr,AF_INET); > my $ip2 = sprintf "%-20s", "[$ip]"; > if ($name eq "") { $name = "not found"; } > my $begin .= $ip2 . $name; > print "$begin\n"; > EOP > ) > > echo $x > > The quotes around the here document name cause Bash to not perform > variable substitutions within the document, so pass $@ to Perl. > Putting > the whole thing in x=$( ) seems to do the trick! :) > > Regards, > James > -- > James Ring > > -- Kim Holburn Security Manager, National ICT Australia Ltd. Ph: +61 2 61258620 M: +61 417820641 F: +61 2 6230 6121 mailto:kim.holburn at nicta.com.au aim://kimholburn skype://kholburn - PGP Public Key on request Cacert Root Cert: http://www.cacert.org/cacert.crt Aust. Spam Act: To stop receiving mail from me: reply and let me know. Use ISO 8601 dates [YYYY-MM-DD] http://www.saqqara.demon.co.uk/ datefmt.htm Democracy imposed from without is the severest form of tyranny. -- Lloyd Biggle, Jr. Analog, Apr 1961 From jarich at perltraining.com.au Fri Jun 23 05:27:00 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Fri, 23 Jun 2006 22:27:00 +1000 Subject: [Canberra-pm] OSDC 2006 -- CFP closes in 2.5 weeks Message-ID: <449BDE14.5090204@perltraining.com.au> G'day Australian Perl Mongers! http://www.osdc.com.au/papers/cfp06.html There are two and a half weeks to go to get your paper in for one of the best Australian conferences this year! The deadline for proposals is 12th July 2006. The Open Source Developers' Conference is an Australian conference designed for developers, by developers. It covers numerous programming languages across a range of operating systems. We're seeking papers on Open Source languages, technologies, projects and tools as well as topics of interest to Open Source developers. The conference will be held in Melbourne, Victoria (Monash University's Caulfield Campus) from the 6th to the 8th of December, 2006. Each day includes three streams of talks, social events and is fully catered with buffet lunch and morning, afternoon teas. For a list of conference presentations from last year visit: http://osdc2005.cgpublisher.com/proposals/ If you have any questions, or have never submitted a paper proposal before, please read our FAQ page at http://www.osdc.com.au/faq/ index.html If you don't find an answer there, please contact richard osdc.com.au To submit a proposal, follow the instructions at http://www.osdc.com.au/papers/cfp06.html This year we're also going to run a day of tutorials. See the CFP for more information. We are also seeking expressions of interest for people to be part of the OSDC 2006 Programme Committee. The Committee's primary responsibility is assessing the proposals submitted by potential speakers. Please email richard osdc.com.au if you are interested, indicating your open source development interests. We look forward to hearing from you! All the best, The OSDC 2006 committee.