From martin_jacobs at optusnet.com.au Mon Jan 22 22:21:22 2007 From: martin_jacobs at optusnet.com.au (Martin Jacobs) Date: Tue, 23 Jan 2007 16:21:22 +1000 Subject: [Brisbane-pm] Looking for a Perl Monger Message-ID: <22A5D28B-665F-4DF4-9877-3071462F3D27@optusnet.com.au> Hi Perl Mongers, I am looking for some help with a private project of mine. What I really need is to be able to sit down with a Perl person and nut out some basic coding issues. I don't expect to have someone else write the code and/or debug it, but I need to learn Perl and I can do it much faster if I can talk to a real live person instead of stumbling around on the net. I am an engineer (not a code-writer) working in Brisbane. I have started an initiative to write an open-source program called PERRMOSS because the programs and tools that we currently use in my discipline are rubbish. What this means is that the tools that local Governments are using to assess environmental impact are failing. You can read about PERRMOSS here. The thing is, I know the engineering theory, but I'm very new to Perl. I have managed to get started (thanks to a mate in UK), but I need to find some local help. If you can spare some time to help, please email me. I should also add that I don't expect to get paid for this, so any contribution that anyone makes to this initiative will be entirely voluntary. What I can offer you is some Kudos for helping to sort out the environment of our creeks and rivers. Regards, Martin Jacobs Visit my website... http://web.mac.com/martin_jacobs1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/brisbane-pm/attachments/20070123/db3ae60f/attachment.html From jarich at perltraining.com.au Mon Jan 22 22:53:56 2007 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Tue, 23 Jan 2007 17:53:56 +1100 Subject: [Brisbane-pm] Looking for a Perl Monger In-Reply-To: <22A5D28B-665F-4DF4-9877-3071462F3D27@optusnet.com.au> References: <22A5D28B-665F-4DF4-9877-3071462F3D27@optusnet.com.au> Message-ID: <45B5B104.4000208@perltraining.com.au> Martin Jacobs wrote: > I need to learn Perl and I can do it much faster if I can > talk to a real live person instead of stumbling around on the net. I can't volunteer to help you out in a physical sense as I'm not based in Brisbane. As you mentioned you aren't getting paid you probably won't want to come on our courses either (27th - 30th March in Brisbane). However, just in case you don't know, our full course manuals are available on our website for free! Go ahead and download them from: http://perltraining.com.au/notes.html If you have any difficulties with them, just let me know. Oh and welcome to Brisbane PM! All the best, J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From jarich at perltraining.com.au Tue Jan 23 20:27:48 2007 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Wed, 24 Jan 2007 15:27:48 +1100 Subject: [Brisbane-pm] Perl Training Australia is coming to Brisbane Message-ID: <45B6E044.5070801@perltraining.com.au> Perl Training Australia is coming to Brisbane, or at least we certainly hope so! We are running our very popular Programming Perl course in Brisbane on the 27th - 30th March 2007 You can book places on this course at: http://perltraining.com.au/bookings/Brisbane.html Book before 19th February to receive a free Perl book (of your choice) per person. You can see a selection of books at: http://perltraining.com.au/books.html Should we receive insufficient bookings before the early bird date (19th February) we may cancel the course. Free Books for Perl Mongers =========================== Register early and mention Brisbane Perl Mongers to get an extra free book; get your friends and colleagues to mention you when they register and we'll give you another free book for each of them. Free books only available for bookings made before the early bird date - 19th February. Books can be selected from our list at: http://perltraining.com.au/books.html If your friends work at a different business than you, then it would be a good idea for you to contact me with a delivery address for your free books. Maximum one extra free book per booking made; if the course doesn't end up going ahead no one gets the books. Group discount ============== Make a single booking for three or more people on the same course and receive a 5% discount per person. Corporate Courses ================= http://perltraining.com.au/corporate.html All of Perl Training Australia's courses are available for corporate bookings. If you have a large group or want training at a particular time then let us know. We're happy to send you a no-obligation quote to provide courses in the time and place that suits you. For more information visit http://perltraining.com.au/corporate.html or call us on 61 3 9354 6001. From martin_jacobs at optusnet.com.au Wed Jan 24 19:12:01 2007 From: martin_jacobs at optusnet.com.au (Martin Jacobs) Date: Thu, 25 Jan 2007 13:12:01 +1000 Subject: [Brisbane-pm] Looking for Perl Mongers 2 and a basic question Message-ID: <15AA3BBE-EB0E-4F27-951E-7E3AA88BD9FD@optusnet.com.au> Hi folks Many thanks to the people who replied to my earlier request for help. I was pleasantly surprised by such a positive response. I might add that I live and work in Camp Hill, Brisbane, so an offer of help near to home would be greatly appreciated. I'll be in contact with the folks who offered to help shortly. In the meantime I've got a genuine Perl Query. I asked a friend of mine in the UK if there was something that would print the same thing to a number of different 'files', including the computer screen. He kindly wrote the following; sub Print_to { my $rfh = shift; print $_ @_ or die $! for @$rfh; } So that when I code Print_to [$a, $b] "Smorg"; Perl prints "Smorg" into the files represented by the variables $a and $b Note that Perl has already assigned filehandles to $a and $b by my $a = ; etc.. This works just fine in my program. The query is how do I get it to print the same thing to screen (I mean to the terminal or command prompt). Is it STDOUT? What's the syntax for saying 'make $a the output to screen'? My workaround at present is Print "Smorg"; Print_to [$a, $b] "Smorg"; which doubles the number of lines in the code. Regards, Martin Visit my website... http://web.mac.com/martin_jacobs1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/brisbane-pm/attachments/20070125/bea25421/attachment.html From djames at thehub.com.au Thu Jan 25 02:51:54 2007 From: djames at thehub.com.au (Damian James) Date: Thu, 25 Jan 2007 20:51:54 +1000 Subject: [Brisbane-pm] Looking for a Perl Monger In-Reply-To: <22A5D28B-665F-4DF4-9877-3071462F3D27@optusnet.com.au> References: <22A5D28B-665F-4DF4-9877-3071462F3D27@optusnet.com.au> Message-ID: <1D87DF6C-55ED-4D8C-BAC3-F121DDF156E3@thehub.com.au> Hi Martin, On 23/01/2007, at 4:21 PM, Martin Jacobs wrote: > Hi Perl Mongers, > > I am looking for some help with a private project of mine. What I > really need is to be able to sit down with a Perl person and nut > out some basic coding issues. I don't expect to have someone else > write the code and/or debug it, but I need to learn Perl and I can > do it much faster if I can talk to a real live person instead of > stumbling around on the net. > I'm happy to sit down over coffee and talk through the issues with you. > I am an engineer (not a code-writer) working in Brisbane. I have > started an initiative to write an open-source program called > PERRMOSS because the programs and tools that we currently use in my > discipline are rubbish. What this means is that the tools that > local Governments are using to assess environmental impact are > failing. You can read about PERRMOSS here. > > The thing is, I know the engineering theory, but I'm very new to > Perl. I have managed to get started (thanks to a mate in UK), but I > need to find some local help. If you can spare some time to help, > please email me. > > I should also add that I don't expect to get paid for this, so any > contribution that anyone makes to this initiative will be entirely > voluntary. What I can offer you is some Kudos for helping to sort > out the environment of our creeks and rivers. I've done some work on a project tracking disease incidence across LGAs in Queensland, representing these graphically in various ways. Nothing very special or flashy, just GD and GD::Graph. Other options are possible. I'm based in the inner north/west. What sort of timing/location would suit you? Cheers Damian From martin_jacobs at optusnet.com.au Tue Jan 30 20:01:53 2007 From: martin_jacobs at optusnet.com.au (Martin Jacobs) Date: Wed, 31 Jan 2007 14:01:53 +1000 Subject: [Brisbane-pm] Convert string to date in Perl Message-ID: Hi all, I would appreciate some help here. How do I convert a string to a date? Here's an example of the string... 25/02/1990 23:48:00 I want to add on 6 minutes, so that the result is... 25/02/1990 23:54:00 Thanks in advance. Regards, Martin Jacobs Visit my website... http://web.mac.com/martin_jacobs1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/brisbane-pm/attachments/20070131/e2257203/attachment.html From djames at thehub.com.au Tue Jan 30 20:11:23 2007 From: djames at thehub.com.au (Damian James) Date: Wed, 31 Jan 2007 14:11:23 +1000 Subject: [Brisbane-pm] Convert string to date in Perl In-Reply-To: References: Message-ID: Time::Local Or roll you own regex, something like: my %date; $_ = '25/02/1990 23:48:00'; @date{ qw/ day month year hour minute second/} = m<^(\d\d?)/(\d \d?)/(\d{4}) +(\d\d):(\d\d):(\d\d)>; $date{ minute } += 6; printf "%2d/%2d/%4d %2d:%2d:%2d", @date{ qw/ day month year hour minute second/}; Though use the module for maintainability. Damian On 31/01/2007, at 2:01 PM, Martin Jacobs wrote: > Hi all, > > I would appreciate some help here. > > How do I convert a string to a date? > > Here's an example of the string... > > 25/02/1990 23:48:00 > > I want to add on 6 minutes, so that the result is... > > 25/02/1990 23:54:00 > > Thanks in advance. > > Regards, > Martin Jacobs > Visit my website... > http://web.mac.com/martin_jacobs1 > > > _______________________________________________ > Brisbane-pm mailing list > Brisbane-pm at pm.org > http://mail.pm.org/mailman/listinfo/brisbane-pm From David.Bussenschutt at qmtechnologies.com Tue Jan 30 20:21:47 2007 From: David.Bussenschutt at qmtechnologies.com (David Bussenschutt) Date: Wed, 31 Jan 2007 14:21:47 +1000 Subject: [Brisbane-pm] Convert string to date in Perl Message-ID: <19F217C6E2CA304CBDFE4D8CB16CA14B0392DD8A@exch-b01.qmtechnologies.com> I use Date::Manip all the time. it rocks. see http://search.cpan.org/~sbeck/DateManip-5.44/Manip.pod use Date::Manip; $date = ParseDate("25/02/1990 23:48:00"); $delta = ParseDateDelta("+ 6 minutes"); $new = DateCalc($date,$delta); # or alternate/shorthand: $new =DateCalc("25/02/1990 23:48:00","+ 6 minutes"); # then output however you like. print &UnixDate($new,"It is now %T on %b %e, %Y."); -----Original Message----- From: brisbane-pm-bounces+david.bussenschutt=qmtechnologies.com at pm.org [mailto:brisbane-pm-bounces+david.bussenschutt=qmtechnologies.com at pm.org ]On Behalf Of Damian James Sent: Wednesday, 31 January 2007 2:11 PM To: Martin Jacobs Cc: Brisbane Perl Group Subject: Re: [Brisbane-pm] Convert string to date in Perl Time::Local Or roll you own regex, something like: my %date; $_ = '25/02/1990 23:48:00'; @date{ qw/ day month year hour minute second/} = m<^(\d\d?)/(\d \d?)/(\d{4}) +(\d\d):(\d\d):(\d\d)>; $date{ minute } += 6; printf "%2d/%2d/%4d %2d:%2d:%2d", @date{ qw/ day month year hour minute second/}; Though use the module for maintainability. Damian On 31/01/2007, at 2:01 PM, Martin Jacobs wrote: > Hi all, > > I would appreciate some help here. > > How do I convert a string to a date? > > Here's an example of the string... > > 25/02/1990 23:48:00 > > I want to add on 6 minutes, so that the result is... > > 25/02/1990 23:54:00 > > Thanks in advance. > > Regards, > Martin Jacobs > Visit my website... > http://web.mac.com/martin_jacobs1 > > > _______________________________________________ > Brisbane-pm mailing list > Brisbane-pm at pm.org > http://mail.pm.org/mailman/listinfo/brisbane-pm _______________________________________________ Brisbane-pm mailing list Brisbane-pm at pm.org http://mail.pm.org/mailman/listinfo/brisbane-pm The message and any attachment is confidential and may be privileged or otherwise protected from disclosure. If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone. From djames at thehub.com.au Tue Jan 30 20:40:09 2007 From: djames at thehub.com.au (Damian James) Date: Wed, 31 Jan 2007 14:40:09 +1000 Subject: [Brisbane-pm] Convert string to date in Perl In-Reply-To: References: Message-ID: Actually looking back over some old code and comparing pod, it looks like I was actually thinking of Date::Parse. So this would be: use Date::Parse; my dt = str2time('25/02/1990 23:48:00'); $dt += 6 * 60; etc Date::Manip wasn't around when I worked with dates in any significant way last. It looks like a better approach. And yeah, obviously what I wrote below doesn't calculate dates correctly :) Off-the-cuff untested example code which clearly would end up in production... On 31/01/2007, at 2:11 PM, Damian James wrote: > Time::Local > > Or roll you own regex, something like: > > my %date; > $_ = '25/02/1990 23:48:00'; > @date{ qw/ day month year hour minute second/} = m<^(\d\d?)/(\d > \d?)/(\d{4}) +(\d\d):(\d\d):(\d\d)>; > $date{ minute } += 6; > printf "%2d/%2d/%4d %2d:%2d:%2d", @date{ qw/ day month year hour > minute second/}; > > Though use the module for maintainability. > > Damian > > On 31/01/2007, at 2:01 PM, Martin Jacobs wrote: > >> Hi all, >> >> I would appreciate some help here. >> >> How do I convert a string to a date? >> >> Here's an example of the string... >> >> 25/02/1990 23:48:00 >> >> I want to add on 6 minutes, so that the result is... >> >> 25/02/1990 23:54:00 >> >> Thanks in advance. >> >> Regards, >> Martin Jacobs >> Visit my website... >> http://web.mac.com/martin_jacobs1 >> >> >> _______________________________________________ >> Brisbane-pm mailing list >> Brisbane-pm at pm.org >> http://mail.pm.org/mailman/listinfo/brisbane-pm > > _______________________________________________ > Brisbane-pm mailing list > Brisbane-pm at pm.org > http://mail.pm.org/mailman/listinfo/brisbane-pm