From jhannah at omnihotels.com Fri Dec 1 15:33:47 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri, 1 Dec 2006 17:33:47 -0600 Subject: [Omaha.pm] No soup for you! 1 year! Message-ID: <29AB736ABCE5C745ABF9C93B02F2C27B073C9060@exchange2k3.omnihotels.net> -laugh- Well there's one way to skip my tests. Perhaps I should fix whatever isn't working for that pbaker guy? j $ head -2 demo1.t use Test::More(tests=>5); exit if ($ENV{USER} eq 'pbaker'); From jhannah at omnihotels.com Fri Dec 1 16:43:47 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri, 1 Dec 2006 18:43:47 -0600 Subject: [Omaha.pm] No soup for you! 1 year! Message-ID: <29AB736ABCE5C745ABF9C93B02F2C27B073C90A1@exchange2k3.omnihotels.net> From: Jay Hannah > Well there's one way to skip my tests. Perhaps I should fix whatever isn't working for that pbaker guy? All better, even as pbaker. :) j $ id uid=503(pbaker) gid=100(users) groups=100(users),14(uucp),16(dialout),17(audio),33(video),500(resmis) $ prove -r Buffer/TCP/t/Listen........ok Buffer/TCP/t/WriteOnce.....ok Buffer/t/FIFO..............ok Buffer/t/TCP...............ok Payload/t/ASCII00_Delim....ok Payload/t/Raw..............ok Payload/t/USW..............ok t/Buffers..................ok t/Payload..................ok t/demo1/demo1..............ok t/demo2/1..................ok t/demo2/2..................ok t/demo2/3..................ok All tests successful. Files=13, Tests=1211, 18 wallclock secs ( 5.46 cusr + 0.42 csys = 5.88 CPU) From jay at jays.net Sun Dec 3 09:19:24 2006 From: jay at jays.net (Jay Hannah) Date: Sun, 3 Dec 2006 11:19:24 -0600 Subject: [Omaha.pm] 2007 daylight savings time change In-Reply-To: <51920.68.13.153.38.1164744007.squirrel@www.linder.org> References: <29AB736ABCE5C745ABF9C93B02F2C27B072F81AA@exchange2k3.omnihotels.net> <51920.68.13.153.38.1164744007.squirrel@www.linder.org> Message-ID: <602BBE97-12BF-484A-8821-30A1D023B3EE@jays.net> On Nov 28, 2006, at 2:00 PM, Daniel Linder wrote: > Of course I can see some people taking the option of just letting some > systems be off by 1 hour for a few extra weeks... :( (How many > times have > we seen the flashing "12:00" on VCRs...) Did you just compare Perl to a VCR? BetaMax or VHS? :) j actually has a friends BetaMax sitting 5 feet away which he needs to burn to DVD-R via Mac OS X :) From jay at jays.net Sun Dec 3 10:03:43 2006 From: jay at jays.net (Jay Hannah) Date: Sun, 3 Dec 2006 12:03:43 -0600 Subject: [Omaha.pm] FWD: FIXME, July 2001 In-Reply-To: <41985.68.13.153.38.1164120571.squirrel@www.linder.org> References: <455EE046.6010402@jays.net> <0229FD96-6A7E-4652-AB04-5034DE44826B@jays.net> <41985.68.13.153.38.1164120571.squirrel@www.linder.org> Message-ID: <312F4566-5AEC-4FEE-8DF5-18DD754A52B6@jays.net> On Nov 21, 2006, at 8:49 AM, Daniel Linder wrote: >> 1.1 (jhopkins 30-Jul-01): $/ = '||||'; # FIXME? > > So, what does the FIXME line do? > > So, If I read it right, this causes the next line to continue > reading from > the file $readfh, and put all characters up to but not including four > 'pipe' symbols, right? Exactly. We have a vendor sending us gobs of ASCII goo and in some cases the delimiter in a constant ASCII stream is '||||'. Fun, huh? :) > If I understand this, the kicker here is that the "\n" characters > are also > placed into the $errmsg variable. They never send us "\n" characters. It's a 1 line stream of ASCII goo they send for months and months on end. Oh... On your hypothetical I'd have to write a little test program to see if you're right or not. :) Want me to do that? j From robert.fulkerson at gmail.com Mon Dec 4 10:53:17 2006 From: robert.fulkerson at gmail.com (Robert Fulkerson) Date: Mon, 4 Dec 2006 12:53:17 -0600 Subject: [Omaha.pm] Lightning Talks at UNO: Tuesday, 12/5 Message-ID: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> Hello all, I apologize for the late notice, but I thought I'd invite everyone to come visit the UNO CSCI 2850 (Perl) class's semester-ending lightning talks tomorrow night. I've attached the flier. With 17 talks at 5 minutes apiece (7 minutes for the two Honors students) and a little time between each one, the evening shouldn't last more than an hour or so. This semester's talks are in room 256 at the Peter Kiewit Institute at 67th & Pacific. They'll start at 6 PM and last until 7:30. Unfortunately, we don't have any funding so there won't be any drinks or food, but you can certainly pick up an expensive pop ($1.25) in one of the machines on the first floor if you'd like. :) Here's a link to Google Maps for the Peter Kiewit Institute: http://tinyurl.com/v5f9s -- raf* * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20061204/ec364c2d/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: 2850 - Talks - 06 - Fa - Lightning Talks Flier.pdf Type: application/pdf Size: 9502 bytes Desc: not available Url : http://mail.pm.org/pipermail/omaha-pm/attachments/20061204/ec364c2d/attachment.pdf From andy at petdance.com Mon Dec 4 10:56:19 2006 From: andy at petdance.com (Andy Lester) Date: Mon, 4 Dec 2006 12:56:19 -0600 Subject: [Omaha.pm] Lightning Talks at UNO: Tuesday, 12/5 In-Reply-To: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> References: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> Message-ID: On Dec 4, 2006, at 12:53 PM, Robert Fulkerson wrote: > Hello all, > > I apologize for the late notice, but I thought I'd invite > everyone to come visit the UNO CSCI 2850 (Perl) class's semester- > ending lightning talks tomorrow night. > > I've attached the flier. With 17 talks at 5 minutes apiece (7 > minutes for the two Honors students) and a little time between each > one, the evening shouldn't last more than an hour or so. I think you mean two hours or so. 17*5 = 85, and that's assuming zero time spent between speakers. This is very cool. I'd like to put this up on the news.perlfoundation.org blog if you don't mind. I wish I could attend! Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From robert.fulkerson at gmail.com Mon Dec 4 11:00:13 2006 From: robert.fulkerson at gmail.com (Robert Fulkerson) Date: Mon, 4 Dec 2006 13:00:13 -0600 Subject: [Omaha.pm] Lightning Talks at UNO: Tuesday, 12/5 In-Reply-To: References: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> Message-ID: <6cb6eebc0612041100j22c3e94aw9b142655e1483ed3@mail.gmail.com> Andy, I think you mean two hours or so. 17*5 = 85, and that's assuming > zero time spent between speakers. True, but that's assuming that nervous students fill the full five minutes for all talks. :) This is very cool. I'd like to put this up on the > news.perlfoundation.org blog if you don't mind. I wish I could attend! Please feel free to post it to the blog. Maybe we could arrange to have you come into town for next semester's talks. Keep your end-of-April open. :) -- b -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20061204/682cc5d5/attachment.html From andy at petdance.com Mon Dec 4 11:23:41 2006 From: andy at petdance.com (Andy Lester) Date: Mon, 4 Dec 2006 13:23:41 -0600 Subject: [Omaha.pm] Lightning Talks at UNO: Tuesday, 12/5 In-Reply-To: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> References: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> Message-ID: <1E635BDB-6106-424D-A7A0-580C1526D55E@petdance.com> On Dec 4, 2006, at 12:53 PM, Robert Fulkerson wrote: > Hello all, > > I apologize for the late notice, but I thought I'd invite > everyone to come visit the UNO CSCI 2850 (Perl) class's semester- > ending lightning talks tomorrow night. Do you have a text-only list of the lineup? I don't want to post an image. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From hostetlerm at gmail.com Mon Dec 4 11:35:17 2006 From: hostetlerm at gmail.com (Mike Hostetler) Date: Mon, 4 Dec 2006 13:35:17 -0600 Subject: [Omaha.pm] Module refuses to return a value Message-ID: I've written my very first Perl module to simplify some of my Excel tasks (don't ask. No, really) . My module looks something like this: package ExcelUtil; use strict; use vars qw($VERSION); $VERSION='0.5'; sub getCellByValue { my ($sheet,$rangeName,$value) = @_; ## if the range name ends in :, then select the whole row! ## yes, I made this up myself if ($rangeName=~m/(\d+):$/) { my $row = $1; $rangeName = "A$row:AG$row"; } my $range = $sheet->Range($rangeName); foreach my $cell (in $range) { if ($cell->{'Text'} eq $value) { print $cell->{"Text"}."\n"; return $cell; } } return 0; } 1; The print statement is there to tell us the value before it's returned. I'm calling is like this: my $cell = ExcelUtil::getCellByValue($Sheet,"A2:A32",$cellDate); print $cell->{'Text'}."\n"; And this is my output: 12/04/2006 Use of uninitialized value in concatenation (.) or string at tfireport.pls line 182. 12/04/2006 is the correct value that I'm looking for, so the subroutine is finding the right value, but stubbornly refuses to give me a value back. If I put the getCellByValue sub in my script than everything is fine. So I'm missing something in my module. Anyone wish to bring me to enlightenment? -- Mike Hostetler http://mike.hostetlerhome.com/ From andy at petdance.com Mon Dec 4 12:56:21 2006 From: andy at petdance.com (Andy Lester) Date: Mon, 4 Dec 2006 14:56:21 -0600 Subject: [Omaha.pm] Lightning Talks at UNO: Tuesday, 12/5 In-Reply-To: <6cb6eebc0612041100j22c3e94aw9b142655e1483ed3@mail.gmail.com> References: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> <6cb6eebc0612041100j22c3e94aw9b142655e1483ed3@mail.gmail.com> Message-ID: <73C15A6F-F5B1-47B6-9B59-CA82211BEC1B@petdance.com> > > Please feel free to post it to the blog. Maybe we could > arrange to have you come into town for next semester's talks. Keep > your end-of-April open. :) http://news.perl-foundation.org/2006/12/lightning_talks_in_omaha.html I'd love to see the talks written up if they're available anywhere, especially the ones about Mech, and especially if they include code that I can include in the WWW-Mechanize distribution. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From dan at linder.org Tue Dec 5 12:35:33 2006 From: dan at linder.org (Daniel Linder) Date: Tue, 5 Dec 2006 14:35:33 -0600 (CST) Subject: [Omaha.pm] FWD: FIXME, July 2001 In-Reply-To: <312F4566-5AEC-4FEE-8DF5-18DD754A52B6@jays.net> References: <455EE046.6010402@jays.net> <0229FD96-6A7E-4652-AB04-5034DE44826B@jays.net> <41985.68.13.153.38.1164120571.squirrel@www.linder.org> <312F4566-5AEC-4FEE-8DF5-18DD754A52B6@jays.net> Message-ID: <56871.63.230.40.29.1165350933.squirrel@www.linder.org> On Nov 21, 2006, at 8:49 AM, Daniel Linder wrote: > So, If I read it right, this causes the next line to continue > reading from the file $readfh, and put all characters up to but > not including four 'pipe' symbols, right? On Sun, December 3, 2006 12:03, Jay Hannah wrote: > Exactly. We have a vendor sending us gobs of ASCII goo and in some > cases the delimiter in a constant ASCII stream is '||||'. Fun, huh? :) Later, Daniel Linder wrote: > If I understand this, the kicker here is that the "\n" characters > are also placed into the $errmsg variable. Later, Jay Hannah wrote: > They never send us "\n" characters. It's a 1 line stream of ASCII goo > they send for months and months on end. > > Oh... On your hypothetical I'd have to write a little test program to > see if you're right or not. :) Want me to do that? No need, I did it here: $ cat -n TestData 1 This is a test||||This is a second test||||This 2 is a 3 test again||||This is the last test $ cat -n ParseTestData.pl 1 #!perl 2 $/ = '||||'; 3 printf ("Got a line: %s\n",$_) while (<>) ; $ perl ParseTestData.pl < TestData Got a line: This is a test|||| Got a line: This is a second test|||| Got a line: This is a test again|||| Got a line: This is the last test So, it appears that the "$/" variable does keep the \n characters and doesn't treat them as special anymore. Dan - - - - "Wait for that wisest of all counselors, time." -- Pericles "I do not fear computers, I fear the lack of them." -- Isaac Asimov "Soon we will be able to harness the rotational energy from Orwell's grave to solve all world energy problems." -- /. user GigsVT (208848) GPG fingerprint:6FFD DB94 7B96 0FD8 EADF 2EE0 B2B0 CC47 4FDE 9B68 From jay at jays.net Tue Dec 5 17:32:40 2006 From: jay at jays.net (Jay Hannah) Date: Tue, 5 Dec 2006 19:32:40 -0600 Subject: [Omaha.pm] FWD: FIXME, July 2001 In-Reply-To: <56871.63.230.40.29.1165350933.squirrel@www.linder.org> References: <455EE046.6010402@jays.net> <0229FD96-6A7E-4652-AB04-5034DE44826B@jays.net> <41985.68.13.153.38.1164120571.squirrel@www.linder.org> <312F4566-5AEC-4FEE-8DF5-18DD754A52B6@jays.net> <56871.63.230.40.29.1165350933.squirrel@www.linder.org> Message-ID: <9b12ac3060f05eeb4765837e2ccd4c95@jays.net> On Dec 5, 2006, at 2:35 PM, Daniel Linder wrote: > No need, I did it here: > $ cat -n TestData > 1 This is a test||||This is a second test||||This > 2 is a > 3 test again||||This is the last test > > $ cat -n ParseTestData.pl > 1 #!perl > 2 $/ = '||||'; > 3 printf ("Got a line: %s\n",$_) while (<>) ; > > $ perl ParseTestData.pl < TestData > Got a line: This is a test|||| > Got a line: This is a second test|||| > Got a line: This > is a > test again|||| > Got a line: This is the last test Yes sir. Nice demo! > So, it appears that the "$/" variable does keep the \n characters and > doesn't treat them as special anymore. Well, I live in a Linux/AIX universe so for me $/ is "\n" by default. If I change it to "||||" then "\n" is not special anymore. :) "perldoc perlvar" talks about $/ and all the other special vars at length. j From jay at jays.net Tue Dec 5 17:43:41 2006 From: jay at jays.net (Jay Hannah) Date: Tue, 5 Dec 2006 19:43:41 -0600 Subject: [Omaha.pm] Lightning Talks at UNO: Tuesday, 12/5 In-Reply-To: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> References: <6cb6eebc0612041053s5ef69d85y6b25800a08789928@mail.gmail.com> Message-ID: My random thoughts about the presentations: WWW::Mechanize Reminds me of my secret FAA robot and my robot (unfinished) that plays the web game Black Nova Traders for me. If anyone is interested in those I can demo them :) The Brittany Spears Wikipedia hack he demo'd and 2 hacks after that have all been removed by Wikipedia editors. In 20 minutes. Wow. Net::XMPP and Lingua::EN::Syllable I wonder if we can patch that syllable counting bug? $ perl -MLingua::EN::Syllable -e 'print syllable("a")' 2 The perldoc seems pretty non-commital about accuracy, claiming 10-15% failure rate. :) College football BCS scraper I saw an open (FILE, "+ References: <455EE046.6010402@jays.net> <0229FD96-6A7E-4652-AB04-5034DE44826B@jays.net> <41985.68.13.153.38.1164120571.squirrel@www.linder.org> <312F4566-5AEC-4FEE-8DF5-18DD754A52B6@jays.net> <56871.63.230.40.29.1165350933.squirrel@www.linder.org> <9b12ac3060f05eeb4765837e2ccd4c95@jays.net> Message-ID: <3651.68.13.153.38.1165371901.squirrel@www.linder.org> On Dec 5, 2006, at 2:35 PM, Daniel Linder wrote: > So, it appears that the "$/" variable does keep the \n characters and > doesn't treat them as special anymore. On Tue, December 5, 2006 19:32, Jay Hannah wrote: > Well, I live in a Linux/AIX universe so for me $/ is "\n" by default. > If I change it to "||||" then "\n" is not special anymore. :) Since a lot of people use "chop" to remove the trailing \n, for those of you who are forced to use $/ as "||||" could use this, right: $variable =~ s#$/##; That should perform a search/replace of the "||||" with "". Not as simple as "chop" but the code would be re-usable if the delimiter changed in value and/or length. Dan - - - - "Wait for that wisest of all counselors, time." -- Pericles "I do not fear computers, I fear the lack of them." -- Isaac Asimov "Soon we will be able to harness the rotational energy from Orwell's grave to solve all world energy problems." -- /. user GigsVT (208848) GPG fingerprint:6FFD DB94 7B96 0FD8 EADF 2EE0 B2B0 CC47 4FDE 9B68 From andy at petdance.com Tue Dec 5 19:02:34 2006 From: andy at petdance.com (Andy Lester) Date: Tue, 5 Dec 2006 21:02:34 -0600 Subject: [Omaha.pm] FWD: FIXME, July 2001 In-Reply-To: <3651.68.13.153.38.1165371901.squirrel@www.linder.org> References: <455EE046.6010402@jays.net> <0229FD96-6A7E-4652-AB04-5034DE44826B@jays.net> <41985.68.13.153.38.1164120571.squirrel@www.linder.org> <312F4566-5AEC-4FEE-8DF5-18DD754A52B6@jays.net> <56871.63.230.40.29.1165350933.squirrel@www.linder.org> <9b12ac3060f05eeb4765837e2ccd4c95@jays.net> <3651.68.13.153.38.1165371901.squirrel@www.linder.org> Message-ID: On Dec 5, 2006, at 8:25 PM, Daniel Linder wrote: > That should perform a search/replace of the "||||" with "". Not as > simple > as "chop" but the code would be re-usable if the delimiter changed in > value and/or length. I hope you mean chomp, not chop. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Sat Dec 9 08:08:38 2006 From: jay at jays.net (Jay Hannah) Date: Sat, 9 Dec 2006 10:08:38 -0600 Subject: [Omaha.pm] offutt.pm.org Message-ID: <1151E58A-C6D7-4944-AB1C-3539B0226055@jays.net> Hi Steven -- How's your new Offutt AFB Perl Monger group coming along? http://offutt.pm.org/ Your cohorts over here in Omaha.pm want to know! Our panty raid plans are all on hold over here. :) j From jay at jays.net Sat Dec 9 08:14:24 2006 From: jay at jays.net (Jay Hannah) Date: Sat, 9 Dec 2006 10:14:24 -0600 Subject: [Omaha.pm] Module refuses to return a value In-Reply-To: References: Message-ID: <14F56DAA-C29E-4E18-A5FD-1EE2F8DB4346@jays.net> On Dec 4, 2006, at 1:35 PM, Mike Hostetler wrote: > If I put the getCellByValue sub in my script than everything is fine. > So I'm missing something in my module. Anyone wish to bring me to > enlightenment? I didn't see anything "wrong" with your code at a glance. My next step would be to play with it in the debugger. Have you used it before? It's awfully handy. I'd be happy to help you at the next meeting if you want. perldoc perldebug perldoc perldebtut HTH, j From jay at jays.net Sat Dec 9 08:32:55 2006 From: jay at jays.net (Jay Hannah) Date: Sat, 9 Dec 2006 10:32:55 -0600 Subject: [Omaha.pm] Meeting reminder: Tue, 12 Dec 2006 @ 7pm! Message-ID: <83EA7326-6F2B-466B-BDDC-80BA5E92BC89@jays.net> http://omaha.pm.org/ Any topic suggestions? Otherwise Kiran and Jay will probably be getting jiggy w/ BioPerl again (Project OpenLab). At the UNO lightning talks someone else threatened to show up too but I'm pretty sure he was only kidding. :) And I'm such a crappy recruiter / social coordinator that I forgot his name already. -laugh- oh, but we will have pizza again! mmmmmmmmmm... forbidden pizza j From ryan at cfwebtools.com Sat Dec 9 09:49:30 2006 From: ryan at cfwebtools.com (Ryan Stille) Date: Sat, 09 Dec 2006 11:49:30 -0600 Subject: [Omaha.pm] Meeting reminder: Tue, 12 Dec 2006 @ 7pm! In-Reply-To: <83EA7326-6F2B-466B-BDDC-80BA5E92BC89@jays.net> References: <83EA7326-6F2B-466B-BDDC-80BA5E92BC89@jays.net> Message-ID: <457AF72A.8000506@cfwebtools.com> Jay Hannah wrote: > http://omaha.pm.org/ > > Any topic suggestions? XML processing, XSLT transformations, session handling, creating/consuming web services. I wonder if it would be possible to get some guest speakers presenting remotely? Using something like Adobe Acrobat Connect or even just vnc and voip. The presentation Andy Lester gave to the Toronto group in September sounds awesome. http://to.pm.org/#2006-09 -Ryan From jay at jays.net Sat Dec 9 12:27:48 2006 From: jay at jays.net (Jay Hannah) Date: Sat, 9 Dec 2006 14:27:48 -0600 Subject: [Omaha.pm] Meeting reminder: Tue, 12 Dec 2006 @ 7pm! In-Reply-To: <457AF72A.8000506@cfwebtools.com> References: <83EA7326-6F2B-466B-BDDC-80BA5E92BC89@jays.net> <457AF72A.8000506@cfwebtools.com> Message-ID: On Dec 9, 2006, at 11:49 AM, Ryan Stille wrote: >> Any topic suggestions? > XML processing, XSLT transformations, I can show you some XML::Twig stuff I've done. Simple examples and complex ones. I've never done XSLT. > session handling, ... in Apache? We use home-brewed cookie stuff I could show. > creating/consuming web services. Consuming via SOAP::Lite is pretty straight forward. Easy to demo a cheesy stock "ticker", for example. Setting up WSDL is a pain in the arse. I've done it. It hurt. All of our web services stuff is experimental. We haven't found a single solid, scalable, practical production use yet. So far we've used https POST combinations instead. > I wonder if it would be possible to get some guest speakers presenting > remotely? Using something like Adobe Acrobat Connect or even just vnc > and voip. The presentation Andy Lester gave to the Toronto group in > September sounds awesome. http://to.pm.org/#2006-09 Andy: Have you ever done a remote? j From hostetlerm at gmail.com Sat Dec 9 14:19:01 2006 From: hostetlerm at gmail.com (Mike Hostetler) Date: Sat, 9 Dec 2006 16:19:01 -0600 Subject: [Omaha.pm] Module refuses to return a value In-Reply-To: <14F56DAA-C29E-4E18-A5FD-1EE2F8DB4346@jays.net> References: <14F56DAA-C29E-4E18-A5FD-1EE2F8DB4346@jays.net> Message-ID: Actually I figured it out. It wasn't my code -- it was my data! :) I was looking for a date in the Excel sheet and (when I wrote the script at the end of the month) the date was mm/dd/yyyy. I thought at the beginning of the month it would be mm/0d/yyyy but it's actually mm/d/yyyy. Stupid Excel! Anyway, I changed my regex (which I didn't see) and now my module works fine Thanks for the reply though. Mike On 12/9/06, Jay Hannah wrote: > On Dec 4, 2006, at 1:35 PM, Mike Hostetler wrote: > > If I put the getCellByValue sub in my script than everything is fine. > > So I'm missing something in my module. Anyone wish to bring me to > > enlightenment? > > I didn't see anything "wrong" with your code at a glance. My next > step would be to play with it in the debugger. Have you used it > before? It's awfully handy. I'd be happy to help you at the next > meeting if you want. > > perldoc perldebug > perldoc perldebtut > > HTH, > > j > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -- Mike Hostetler http://mike.hostetlerhome.com/ From jay at jays.net Sat Dec 9 16:23:22 2006 From: jay at jays.net (Jay Hannah) Date: Sat, 9 Dec 2006 18:23:22 -0600 Subject: [Omaha.pm] Module refuses to return a value In-Reply-To: References: <14F56DAA-C29E-4E18-A5FD-1EE2F8DB4346@jays.net> Message-ID: On Dec 9, 2006, at 4:19 PM, Mike Hostetler wrote: > Actually I figured it out. It wasn't my code -- it was my data! :) I > was looking for a date in the Excel sheet and (when I wrote the script > at the end of the month) the date was mm/dd/yyyy. I thought at the > beginning of the month it would be mm/0d/yyyy but it's actually > mm/d/yyyy. Stupid Excel! > > Anyway, I changed my regex (which I didn't see) and now my module > works fine I got *really* tired of date format programming so I started a torrid love affair with Class::Date earlier this year. http://search.cpan.org/~dlux/Class-Date-1.1.9/Date.pod You might like it. :) (We sub-class it for our own mischievous purposes.) j From rob.townley at gmail.com Sun Dec 10 10:59:04 2006 From: rob.townley at gmail.com (Rob Townley) Date: Sun, 10 Dec 2006 12:59:04 -0600 Subject: [Omaha.pm] Meeting reminder: Tue, 12 Dec 2006 @ 7pm! In-Reply-To: <457AF72A.8000506@cfwebtools.com> References: <83EA7326-6F2B-466B-BDDC-80BA5E92BC89@jays.net> <457AF72A.8000506@cfwebtools.com> Message-ID: <7e84ed60612101059nd8b8158i8b40da051a605972@mail.gmail.com> On 12/9/06, Ryan Stille wrote: > Jay Hannah wrote: > > http://omaha.pm.org/ > > > > Any topic suggestions? > XML processing, XSLT transformations, session handling, > creating/consuming web services. > > I wonder if it would be possible to get some guest speakers presenting > remotely? Using something like Adobe Acrobat Connect or even just vnc > and voip. The presentation Andy Lester gave to the Toronto group in > September sounds awesome. http://to.pm.org/#2006-09 webhuddle.sourceforge.net is a free and open source web conferencing system and doubles as a rudimentary training video creator. Both server and client are open source java apps. The author even has a demo system you might be able to use. It does have VOIP, but FreeConferenceCall and the other free phone based free conference calling systems are recommended. From ryan at cfwebtools.com Tue Dec 12 13:56:22 2006 From: ryan at cfwebtools.com (Ryan Stille) Date: Tue, 12 Dec 2006 15:56:22 -0600 Subject: [Omaha.pm] Google calendar of Omaha user groups Message-ID: <457F2586.6010606@cfwebtools.com> I created an "It in Omaha" calendar on Google that has the various Omaha user group meetings on it. This link will add it to your Google calendar: http://www.google.com/calendar/render?cid=689bo9l4k74mu9unjbqtnulpn0%40group.calendar.google.com or you can view it directly here: http://www.google.com/calendar/embed?src=689bo9l4k74mu9unjbqtnulpn0%40group.calendar.google.com Or iCal format: http://www.google.com/calendar/ical/689bo9l4k74mu9unjbqtnulpn0%40group.calendar.google.com/public/basic.ics -Ryan From andy at petdance.com Tue Dec 12 14:01:17 2006 From: andy at petdance.com (Andy Lester) Date: Tue, 12 Dec 2006 16:01:17 -0600 Subject: [Omaha.pm] Google calendar of Omaha user groups In-Reply-To: <457F2586.6010606@cfwebtools.com> References: <457F2586.6010606@cfwebtools.com> Message-ID: <5958B27A-BBC6-49E7-9A37-B10CA5134409@petdance.com> On Dec 12, 2006, at 3:56 PM, Ryan Stille wrote: > I created an "It in Omaha" calendar on Google that has the various > Omaha > user group meetings on it. > This link will add it to your Google calendar: > http://www.google.com/calendar/render? > cid=689bo9l4k74mu9unjbqtnulpn0%40group.calendar.google.com Note also that brian d foy has a Google Calendar of Perl things: http://news.perl-foundation.org/2006/12/a_trio_of_perl_calendars.html -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jhannah at omnihotels.com Wed Dec 13 11:34:32 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Wed, 13 Dec 2006 13:34:32 -0600 Subject: [Omaha.pm] o pager=">/tmp/j" Message-ID: That's so cool... When I'm in the debugger and I have a big 'ole object and I want to throw the output of "x" (which shows all the internals of the object (kind of line Data::Dumper only cleaner)) to a file I can just change the behavior of the pager ("|" in the debugger) to write to a file. DB<3> o pager=">/tmp/j" pager = '>/tmp/j' DB<4> |x $o_RA DB<5> q $ ls -al /tmp/j -rw-r--r-- 1 jhannah users 1062485 2006-12-13 13:03 /tmp/j Shawing, j From jay at jays.net Wed Dec 13 18:06:17 2006 From: jay at jays.net (Jay Hannah) Date: Wed, 13 Dec 2006 20:06:17 -0600 Subject: [Omaha.pm] Google calendar of Omaha user groups In-Reply-To: <457F2586.6010606@cfwebtools.com> References: <457F2586.6010606@cfwebtools.com> Message-ID: On Dec 12, 2006, at 3:56 PM, Ryan Stille wrote: > or you can view it directly here: > http://www.google.com/calendar/embed? > src=689bo9l4k74mu9unjbqtnulpn0%40group.calendar.google.com Is that redundant with this? http://itinomaha.org/ j From ryan at cfwebtools.com Thu Dec 14 06:18:49 2006 From: ryan at cfwebtools.com (Ryan Stille) Date: Thu, 14 Dec 2006 08:18:49 -0600 Subject: [Omaha.pm] Google calendar of Omaha user groups In-Reply-To: References: <457F2586.6010606@cfwebtools.com> Message-ID: <45815D49.2040309@cfwebtools.com> Jay Hannah wrote: > On Dec 12, 2006, at 3:56 PM, Ryan Stille wrote: > >> or you can view it directly here: >> http://www.google.com/calendar/embed? >> src=689bo9l4k74mu9unjbqtnulpn0%40group.calendar.google.com >> > > Is that redundant with this? > > http://itinomaha.org/ > > j > No. Well that view-only version you quoted above *is* redundant to the it in omaha site (where I got my data from). The real benefit comes when you drop the 'it in omaha' calendar into your google calendar account. This will allow you to see all the 'it in omaha' events in with all your other events you schedule on your calendar. Really only useful if you use google calendar for your calendaring. -Ryan From jay at jays.net Sun Dec 17 08:22:49 2006 From: jay at jays.net (Jay Hannah) Date: Sun, 17 Dec 2006 10:22:49 -0600 Subject: [Omaha.pm] Camel Kit: Last minute X-mas shopping :) Message-ID: <4F6E1037-1335-4E69-BB7E-99167F7C2F0F@jays.net> I'm getting my parents one for Christmas. It's not too late. :) http://mercycorps.org/mercykits/928 (Think they'll put a Perl Mongers logo on the camel for me? -laugh-) j Omaha.pm From sidney.omaha.pm at gmail.com Sun Dec 17 09:56:18 2006 From: sidney.omaha.pm at gmail.com (sidney.omaha.pm at gmail.com) Date: Sun, 17 Dec 2006 11:56:18 -0600 Subject: [Omaha.pm] Camel Kit: Last minute X-mas shopping :) In-Reply-To: <4F6E1037-1335-4E69-BB7E-99167F7C2F0F@jays.net> Message-ID: <3.0.6.32.20061217115618.00aa3370@pop.radiks.net> At 10:22 AM 12/17/2006 -0600, Jay Hannah wrote: >I'm getting my parents one for Christmas. It's not too late. :) > >http://mercycorps.org/mercykits/928 Great idea. You could give a llama through Heifer International. http://tinyurl.com/y62d68 >(Think they'll put a Perl Mongers logo on the camel for me? -laugh-) Weeellll... Heifer lets people set up a gift registry and people can donate through that (see wendyknits.com - Wendy has raised $24,680.00 just since November 6th) I don't have time, but maybe somebody else does. Maybe we should set up a gift registry for Omaha.PM, designate chicks, ducks and geese honorary penguins and sheep and goats honorary camels for the duration, maybe ask O'Reilly to donate prizes for a weekly drawing. The Perl Community should be able to do at least as well as a bunch of knitters. Just sayin. -Sidney From jay at jays.net Thu Dec 21 15:12:21 2006 From: jay at jays.net (Jay Hannah) Date: Thu, 21 Dec 2006 17:12:21 -0600 (CST) Subject: [Omaha.pm] My robots have been captcha'd Message-ID: Some of you may have seen my FAA robot demo over the years. They implemented a Captcha system: http://en.wikipedia.org/wiki/Captcha So now my robots are dead. The same system stopping spam on our wiki has slain my cool little robots. Does that make me a white hat or a black hat? -grin- j From pbaker at omnihotels.com Fri Dec 22 05:54:23 2006 From: pbaker at omnihotels.com (Sean Baker) Date: Fri, 22 Dec 2006 07:54:23 -0600 Subject: [Omaha.pm] My robots have been captcha'd Message-ID: >So now my robots are dead. The same system stopping spam on our wiki has slain my cool little robots. As far as I know, that's a government site. Maybe you can sue them on behalf of your bots? http://en.wikipedia.org/wiki/Section_508 Sean Baker Omni Hotels From pbaker at omnihotels.com Fri Dec 22 05:58:27 2006 From: pbaker at omnihotels.com (Sean Baker) Date: Fri, 22 Dec 2006 07:58:27 -0600 Subject: [Omaha.pm] My robots have been captcha'd Message-ID: > As far as I know, that's a government site. Maybe you can sue them on > behalf of your bots? I'm specifically talking about this bullet and the use of a captcha: "Software Applications and Operating Systems: includes usability for people that are visually impaired, such as alternative keyboard navigation." Sean From sjedwards at omnihotels.com Fri Dec 22 07:54:43 2006 From: sjedwards at omnihotels.com (Sean J. Edwards) Date: Fri, 22 Dec 2006 09:54:43 -0600 Subject: [Omaha.pm] My robots have been captcha'd In-Reply-To: References: Message-ID: <1166802883.27807.1.camel@sjedwards.omnihotels.com> So . . . visually impaired people need to have the ability to bid and reserve airplane landing time with airports with an FAA web application? Facinating. On Fri, 2006-12-22 at 07:58 -0600, Sean Baker wrote: > > As far as I know, that's a government site. Maybe you can sue them on > > > behalf of your bots? > > I'm specifically talking about this bullet and the use of a captcha: > > "Software Applications and Operating Systems: includes usability for > people that are visually impaired, such as alternative keyboard > navigation." > > Sean > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -- -=Sean Edwards=- Omni Hotels Reservation Center 11819 Miami St 3rd Floor Omaha, NE 68164 sjedwards at omnihotels.com 402-952-6528 Omni Hotels is proud to be ranked Highest In Guest Satisfaction Among Upscale Hotel Chains by J.D. Power and Associates for the second consecutive year. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20061222/721dd147/attachment.html From KThompson at heiskell.com Fri Dec 22 08:05:18 2006 From: KThompson at heiskell.com (Thompson, Kenn) Date: Fri, 22 Dec 2006 08:05:18 -0800 Subject: [Omaha.pm] My robots have been captcha'd Message-ID: <16F8D15756891C4EA961565331A3B350066CDBEA@JDHEXC01.heiskell.com> So . . . visually impaired people need to have the ability to bid and reserve airplane landing time with airports with an FAA web application? [Thompson, Kenn] Maybe Bill Gates' secretary is blind, and she's booking him time to fly his new Vista operated Aero device. Oh wait, that'll blue screen during taxi anyway. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20061222/61d610ce/attachment.html From jhannah at omnihotels.com Thu Dec 28 11:01:27 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Thu, 28 Dec 2006 13:01:27 -0600 Subject: [Omaha.pm] Calling a method w/o an object :) Message-ID: $ad (arrival date) is an object of a class that is a subclass of Class::Date. http://search.cpan.org/~dlux/Class-Date-1.1.9/Date.pod Here I'm calling the format() method on objects which result from adding days to arrival date... my ($day1, $day2, $day3) = ( $ad->format("%Y-%m-%d"), ($ad + "1D")->format("%Y-%m-%d"), ($ad + "2D")->format("%Y-%m-%d") ); Wrapping $ad + "1D" in parentheses lets me a call a method on the resulting object w/o naming that object (who needs an extra line of code?)... And the results in the debugger when $ad is Jan 06, 2007: DB<4> x $day1, $day2, $day3 0 '2007-01-06' 1 '2007-01-07' 2 '2007-01-08' Neat, huh? j From jhannah at omnihotels.com Thu Dec 28 13:28:51 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Thu, 28 Dec 2006 15:28:51 -0600 Subject: [Omaha.pm] Evolution or devolution? Message-ID: Here's three code snippets in 3 different chunks of code that do the same thing... Is this progress? :) j First example I found... my ($common_rate,$cnt); foreach my $rate (keys %common_rates) { if ($common_rates{$rate} >= $cnt) { next if ($rate < $common_rate); $common_rate = $rate; $cnt = $common_rates{$rate}; } } Second example I found... my ($highest_frequency) = reverse sort values %ratecount; @rates = grep { $ratecount{$_} == $highest_frequency } @rates; my @common = reverse sort @rates; return $common[0]; Code I just wrote: print [ sort { $common_rates{$b} <=> $common_rates{$a} } keys %common_rates ]->[0]; http://cancerweb.ncl.ac.uk/cgi-bin/omd?query=devolution&action=Search+OM D From KThompson at heiskell.com Thu Dec 28 13:37:45 2006 From: KThompson at heiskell.com (Thompson, Kenn) Date: Thu, 28 Dec 2006 13:37:45 -0800 Subject: [Omaha.pm] Evolution or devolution? Message-ID: <16F8D15756891C4EA961565331A3B350066CDC19@JDHEXC01.heiskell.com> >> print [ sort { $common_rates{$b} <=> $common_rates{$a} } keys %common_rates ]->[0]; Definitely shorter, but less readable (at least for us newbs). Is it noticably faster? From pbaker at omnihotels.com Thu Dec 28 13:36:39 2006 From: pbaker at omnihotels.com (Sean Baker) Date: Thu, 28 Dec 2006 15:36:39 -0600 Subject: [Omaha.pm] Evolution or devolution? Message-ID: There is such a thing as maintainable code. I guess a Schwartzian Transform isn't all that bad. http://en.wikipedia.org/wiki/Schwartzian_Transform Sean Baker Omni Hotels -----Original Message----- From: omaha-pm-bounces+pbaker=omnihotels.com at pm.org [mailto:omaha-pm-bounces+pbaker=omnihotels.com at pm.org] On Behalf Of Jay Hannah Sent: Thursday, December 28, 2006 3:29 PM To: omaha-pm at pm.org Subject: [Omaha.pm] Evolution or devolution? Here's three code snippets in 3 different chunks of code that do the same thing... Is this progress? :) j First example I found... my ($common_rate,$cnt); foreach my $rate (keys %common_rates) { if ($common_rates{$rate} >= $cnt) { next if ($rate < $common_rate); $common_rate = $rate; $cnt = $common_rates{$rate}; } } Second example I found... my ($highest_frequency) = reverse sort values %ratecount; @rates = grep { $ratecount{$_} == $highest_frequency } @rates; my @common = reverse sort @rates; return $common[0]; Code I just wrote: print [ sort { $common_rates{$b} <=> $common_rates{$a} } keys %common_rates ]->[0]; http://cancerweb.ncl.ac.uk/cgi-bin/omd?query=devolution&action=Search+OM D _______________________________________________ Omaha-pm mailing list Omaha-pm at pm.org http://mail.pm.org/mailman/listinfo/omaha-pm From andy at petdance.com Thu Dec 28 13:37:57 2006 From: andy at petdance.com (Andy Lester) Date: Thu, 28 Dec 2006 15:37:57 -0600 Subject: [Omaha.pm] Evolution or devolution? In-Reply-To: <16F8D15756891C4EA961565331A3B350066CDC19@JDHEXC01.heiskell.com> References: <16F8D15756891C4EA961565331A3B350066CDC19@JDHEXC01.heiskell.com> Message-ID: <2526EF8D-FE5A-4186-86FA-1E7E997198B5@petdance.com> On Dec 28, 2006, at 3:37 PM, Thompson, Kenn wrote: >>> print [ sort { $common_rates{$b} <=> $common_rates{$a} } keys > %common_rates ]->[0]; > > Definitely shorter, but less readable (at least for us newbs). Is it > noticably faster? The question of "is it faster" is almost always irrelevant. Processor time is orders of magnitude less expensive than programmer time. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From pbaker at omnihotels.com Thu Dec 28 13:40:22 2006 From: pbaker at omnihotels.com (Sean Baker) Date: Thu, 28 Dec 2006 15:40:22 -0600 Subject: [Omaha.pm] Evolution or devolution? Message-ID: > The question of "is it faster" is almost always irrelevant. Processor time is orders of magnitude less expensive than programmer time. Try telling that to my boss! I'm always saying throw more hardware at it, lol..... Sean Baker Software Architect Omni Hotels _______________________________________________ Omaha-pm mailing list Omaha-pm at pm.org http://mail.pm.org/mailman/listinfo/omaha-pm From andy at petdance.com Thu Dec 28 13:44:38 2006 From: andy at petdance.com (Andy Lester) Date: Thu, 28 Dec 2006 15:44:38 -0600 Subject: [Omaha.pm] Evolution or devolution? In-Reply-To: References: Message-ID: <53A0C78A-A1A1-4A92-ACFA-88AB44392DE5@petdance.com> On Dec 28, 2006, at 3:40 PM, Sean Baker wrote: >> The question of "is it faster" is almost always irrelevant. > Processor time is orders of magnitude less expensive than programmer > time. > > Try telling that to my boss! I'm always saying throw more hardware at > it, lol..... Then use profiling tools to find out where your hotspots are. Chances are that the specifics of how to write a sort are not the bottleneck. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jhannah at omnihotels.com Thu Dec 28 14:15:15 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Thu, 28 Dec 2006 16:15:15 -0600 Subject: [Omaha.pm] Evolution or devolution? Message-ID: Huh. None of those look like a Schwartzian Transform to me...? http://en.wikipedia.org/wiki/Schwartzian_Transform I don't have a map sort map anywhere? j -----Original Message----- From: Sean Baker Sent: Thursday, December 28, 2006 3:32 PM To: Jay Hannah Cc: Trey Bianchini Subject: RE: [Omaha.pm] Evolution or devolution? There is such a thing as maintainable code. I guess a Schwartzian Transform isn't all that bad. Sean Baker Software Architect Omni Hotels (402) 952-6508 pbaker at omnihotels.com -----Original Message----- From: omaha-pm-bounces+pbaker=omnihotels.com at pm.org [mailto:omaha-pm-bounces+pbaker=omnihotels.com at pm.org] On Behalf Of Jay Hannah Sent: Thursday, December 28, 2006 3:29 PM To: omaha-pm at pm.org Subject: [Omaha.pm] Evolution or devolution? Here's three code snippets in 3 different chunks of code that do the same thing... Is this progress? :) j First example I found... my ($common_rate,$cnt); foreach my $rate (keys %common_rates) { if ($common_rates{$rate} >= $cnt) { next if ($rate < $common_rate); $common_rate = $rate; $cnt = $common_rates{$rate}; } } Second example I found... my ($highest_frequency) = reverse sort values %ratecount; @rates = grep { $ratecount{$_} == $highest_frequency } @rates; my @common = reverse sort @rates; return $common[0]; Code I just wrote: print [ sort { $common_rates{$b} <=> $common_rates{$a} } keys %common_rates ]->[0]; http://cancerweb.ncl.ac.uk/cgi-bin/omd?query=devolution&action=Search+OM D _______________________________________________ Omaha-pm mailing list Omaha-pm at pm.org http://mail.pm.org/mailman/listinfo/omaha-pm From andy at petdance.com Thu Dec 28 14:17:20 2006 From: andy at petdance.com (Andy Lester) Date: Thu, 28 Dec 2006 16:17:20 -0600 Subject: [Omaha.pm] Evolution or devolution? In-Reply-To: References: Message-ID: <53C18F17-ED63-41BB-9F0A-CBAC777ABFFE@petdance.com> On Dec 28, 2006, at 4:15 PM, Jay Hannah wrote: > my @common = reverse sort @rates; > return $common[0]; Really what you want here is $common[-1], rather than reversing to get the first. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Thu Dec 28 14:27:05 2006 From: jay at jays.net (Jay Hannah) Date: Thu, 28 Dec 2006 16:27:05 -0600 Subject: [Omaha.pm] Evolution or devolution? In-Reply-To: <2526EF8D-FE5A-4186-86FA-1E7E997198B5@petdance.com> References: <16F8D15756891C4EA961565331A3B350066CDC19@JDHEXC01.heiskell.com> <2526EF8D-FE5A-4186-86FA-1E7E997198B5@petdance.com> Message-ID: <240d5c4b39d9abe9a6f58704fe56868f@jays.net> On Dec 28, 2006, at 3:37 PM, Andy Lester wrote: > The question of "is it faster" is almost always irrelevant. > Processor time is orders of magnitude less expensive than programmer > time. I agree 99% of the time. In this case we're trying to squeeze sub-second response out of massively complex systems under ever-increasing loads. I just spent a week saving a few seconds of processing time. But those few seconds will be saved 1/2 million times a day, so in this case it has been worth my time. Our customers don't want slow interfaces and we want to try to survive all future marketing whimsy. :) You're right, profilers are very much our friend. Devel::Timer is handy too. On Dec 28, 2006, at 4:17 PM, Andy Lester wrote: > On Dec 28, 2006, at 4:15 PM, Jay Hannah wrote: >> my @common = reverse sort @rates; >> return $common[0]; > > Really what you want here is $common[-1], rather than reversing to > get the first. Ya. I abandoned that version altogether. j From jhannah at omnihotels.com Fri Dec 29 14:40:34 2006 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri, 29 Dec 2006 16:40:34 -0600 Subject: [Omaha.pm] Binary goo makes logs hard to read Message-ID: Solution: # If there's binary crap in here don't write that to my logs. # Instead, throw [ASCII:24] and the like to the logs. # ----- my $logable = $payload; my $binary_char; while (($binary_char) = ($logable =~ /([^ -~])/)) { my $ord = "[ASCII:" . ord($binary_char) . "]"; $logable =~ s/\Q$binary_char\E/$ord/gs; } $logger->error("I don't understand payload '$logable'"); j