From wwalker at bybent.com Thu Aug 1 15:23:40 2002 From: wwalker at bybent.com (Wayne Walker) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] timing Message-ID: <20020801202340.GG17637@bybent.com> testing 2 -- Wayne Walker From wwalker at bybent.com Thu Aug 1 15:15:50 2002 From: wwalker at bybent.com (Wayne Walker) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] testing Message-ID: <20020801201550.GF17637@bybent.com> testing -- Wayne Walker From chromatic at wgz.org Thu Aug 1 16:15:31 2002 From: chromatic at wgz.org (chromatic) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] testing In-Reply-To: <20020801201550.GF17637@bybent.com> References: <20020801201550.GF17637@bybent.com> Message-ID: <200208011415.31495.chromatic@wgz.org> On Thursday 01 August 2002 13:15, Wayne Walker wrote: > testing ok 1..1 From cp at onsitetech.com Thu Aug 1 16:29:58 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] testing References: <20020801201550.GF17637@bybent.com> <200208011415.31495.chromatic@wgz.org> Message-ID: <00a901c239a2$96796ae0$1a01a8c0@ot.onsitetech.com> ----- Original Message ----- From: "chromatic" To: "Wayne Walker" ; Sent: Thursday, August 01, 2002 2:15 PM Subject: Re: [Pdx-pm] testing > On Thursday 01 August 2002 13:15, Wayne Walker wrote: > > > testing > > ok > 1..1 It looks like we're back up :) /(?:(h)ip){2}\1o{2}ray/! Cheers, Curtis "Ovid is a geek" Poe From jkeroes at eli.net Thu Aug 1 16:44:23 2002 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] Re: BBQ tonight Message-ID: <20020801214423.GJ13315@eli.net> Do me a favor and RSVP if you intend on coming. It will help me know how much food to buy. Thanks, Joshua From cp at onsitetech.com Thu Aug 1 13:13:58 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] Michael Schwern and Brian Ingerson References: <3D4033FC.DE5EAF74@lclark.edu> <20020725190203.GH13315@eli.net> <016a01c23420$e9d3e0d0$1a01a8c0@ot.onsitetech.com> <20020725220149.GO13315@eli.net> <018e01c23428$f3793ba0$1a01a8c0@ot.onsitetech.com> <001701c237e4$75f66b70$1a01a8c0@ot.onsitetech.com> <009401c23813$5095bdc0$1a01a8c0@ot.onsitetech.com> <20020730155907.Q8712@gblx.net> <00bc01c2381d$483a42e0$1a01a8c0@ot.onsitetech.com> <3D473314.D9E4C497@yahoo.com> Message-ID: <000f01c23987$35dd29d0$1a01a8c0@ot.onsitetech.com> I'm sending this on behalf of Joshua who, for some reason, had this email eaten and therefore wondered why it never made the list. Date: Thu, 1 Aug 2002 08:47:30 -0700 (PDT) From: Joshua Keroes Subject: Geeklist -- BBQ Tonight Who: You, your friends, Ingy & Schwern What: BBQ Where: My house, http://ua.sez.hellyeah.org/maps.html When: 6:00pm *TONIGHT* - Thursday, Aug 1 Why: Brian Ingerson [1] and Michael Schwern [2], two prolific Perl programmers are in Portland for ONE MORE NIGHT ONLY. I'll make gustatory before & afters. You're responsible for your own main course & main drink. There will be a hot grill for your burnin' pleasure. Call 503-892-0123 if you get lost. -Joshua [1] http://search.cpan.org/search?author=INGY [2] http://search.cpan.org/search?author=MSCHWERN From mikeraz at PATCH.COM Thu Aug 1 17:32:11 2002 From: mikeraz at PATCH.COM (mikeraz@PATCH.COM) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] testing In-Reply-To: <00a901c239a2$96796ae0$1a01a8c0@ot.onsitetech.com>; from cp@onsitetech.com on Thu, Aug 01, 2002 at 02:29:58PM -0700 References: <20020801201550.GF17637@bybent.com> <200208011415.31495.chromatic@wgz.org> <00a901c239a2$96796ae0$1a01a8c0@ot.onsitetech.com> Message-ID: <20020801153211.A5400@patch.com> On Thu, Aug 01, 2002 at 02:29:58PM -0700, Curtis Poe typed: > /(?:(h)ip){2}\1o{2}ray/! Hmmm, a trailing not operator? Never seen that before. -- Michael Rasmussen aka mikeraz Be appropriate && Follow your curiosity http://www.patch.com/ http://wiki.patch.com/ http://blog.patch.com/sandbox/ The fortune cookie says: Let no guilty man escape. -- U.S. Grant From jkeroes at eli.net Thu Aug 1 10:45:36 2002 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] BBQ Tonight Message-ID: <20020801154536.GX13315@eli.net> Who: You, your friends, Ingy & Schwern What: BBQ Where: My house, http://ua.sez.hellyeah.org/maps.html When: 6:00pm *TONIGHT* - Thursday, Aug 1 Why: Brian Ingerson [1] and Michael Schwern [2], two prolific Perl programmers are in Portland for ONE MORE NIGHT ONLY. I'll make gustatory before & afters. You're responsible for your own main course & main drink. There will be a hot grill for your burnin' pleasure. Call 503-892-0123 if you get lost. -Joshua [1] http://search.cpan.org/search?author=INGY [2] http://search.cpan.org/search?author=MSCHWERN From cp at onsitetech.com Fri Aug 2 15:48:37 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:11 2004 Subject: [Pdx-pm] Free book: Embedding and Extending Perl References: <20020801154536.GX13315@eli.net> Message-ID: <006f01c23a65$fb0f3160$1a01a8c0@ot.onsitetech.com> Aside from the previous offer of a Box o' Books from Manning, I've just received an offer for a free copy of "Embedding and Extending Perl" (http://www.manning.com/jenness/index.html). I have a pdf version right now and it looks great. The free copy is contingent upon someone reading it, reviewing it, and publishing the review. The review can be on our Web site, distributed as part of a newsletter, or any of a number of other distribution methods. If anyone is willing to commit to reading the book and writing a review within 60 days of receipt, I will take them up on the offer and they'll get to keep the book. I would accept the book myself, but I think it's a bit more fair to give others first crack at it. If I get more than one volunteer, we'll have to consider how to duke it out. I have some thoughts on this but I'll keep mum until I get some responses. -- Cheers, Curtis Poe Senior Programmer ONSITE! Technology, Inc. www.onsitetech.com 503-233-1418 Taking e-Business and Internet Technology To The Extreme! From jgoalby at hotmail.com Fri Aug 9 20:33:52 2002 From: jgoalby at hotmail.com (John Goalby) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Perl Journal Message-ID: Anybody missing some issues of the Perl Journal that they need to complete their collection? I have issues 1 though 9 in excellent condition. John. _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com From cp at onsitetech.com Mon Aug 12 14:50:54 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Next meeting References: <20020801154536.GX13315@eli.net> Message-ID: <008d01c24239$91f978d0$1a01a8c0@ot.onsitetech.com> Hey everyone, don't forget Wednesday night's meeting. Details are at http://portland.pm.org/. Unfortunately, due to another commitment, I will not be able to make it, so I hope to see you next month. -- Cheers, Curtis Poe Senior Programmer ONSITE! Technology, Inc. www.onsitetech.com 503-233-1418 Taking e-Business and Internet Technology To The Extreme! From merlyn at stonehenge.com Mon Aug 12 16:16:44 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Next meeting In-Reply-To: <008d01c24239$91f978d0$1a01a8c0@ot.onsitetech.com> References: <20020801154536.GX13315@eli.net> <008d01c24239$91f978d0$1a01a8c0@ot.onsitetech.com> Message-ID: <864rdzeq0z.fsf@blue.stonehenge.com> >>>>> "Curtis" == Curtis Poe writes: Curtis> Hey everyone, don't forget Wednesday night's meeting. Details are at Curtis> http://portland.pm.org/. Curtis> Unfortunately, due to another commitment, I will not be able to make it, so Curtis> I hope to see you next month. And I'm currently in Hawaii, so neither I nor my WiFi access point will be there. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From russj at dimstar.net Mon Aug 12 23:12:39 2002 From: russj at dimstar.net (Russ Johnson) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Error opening a file. Message-ID: <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> I have the following line in my script: my $input = new IO::File ("< $location/$area/$msg.xml"); Which gives me the following error: Use of uninitialized value in concatenation (.) or string at /home/httpd/cgi-bin/readmsg.pl line 55. I've verified that $location, $area and $msg all have values. I've tried escaping the period. Another script with a very similar line (index.xml insead of $msg.xml) works fine. What am I doing wrong? Russ Johnson Stargate Online http://www.dimstar.net telnet://telnet.dimstar.net ICQ: 3739685 No man ever steps in the same river twice, for it's not the same river and he's not the same man. Heraclitus From merlyn at stonehenge.com Tue Aug 13 00:29:34 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Error opening a file. In-Reply-To: <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> References: <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> Message-ID: <86sn1jcon5.fsf@blue.stonehenge.com> >>>>> "Russ" == Russ Johnson writes: Russ> I have the following line in my script: Russ> my $input = new IO::File ("< $location/$area/$msg.xml"); Russ> Which gives me the following error: Russ> Use of uninitialized value in concatenation (.) or string at Russ> /home/httpd/cgi-bin/readmsg.pl line 55. Russ> I've verified that $location, $area and $msg all have values. If that's the error you're getting, I'm betting something there is not as you say. I'd bet the rent on it. Either you aren't running the script you think you are, or you aren't verifying that all of those values are defined() true, or something is broken with your Perl. But it is not as you say. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From cfrjlr at yahoo.com Tue Aug 13 07:59:49 2002 From: cfrjlr at yahoo.com (charles radley) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Error opening a file. In-Reply-To: <86sn1jcon5.fsf@blue.stonehenge.com> Message-ID: <20020813125949.97025.qmail@web13409.mail.yahoo.com> Randall, I agree with your assessment. In cases of bizarre behavior, I frequently break the offending line into pieces to see if I can isolate the problem. In this case I would rewrite as follows: $fullPath = "location/$area/$msg.xml"; print "\n$fullPath\n"; my $input = new IO::File ("< $fullPath"); Merlyn, try that and let us know what happens. Cheers, Charles F. Radley - CSQE --- "Randal L. Schwartz" wrote: > >>>>> "Russ" == Russ Johnson > writes: > > Russ> I have the following line in my script: > Russ> my $input = new IO::File ("< $location/$area/$msg.xml"); __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com From russj at dimstar.net Tue Aug 13 11:50:48 2002 From: russj at dimstar.net (Russ Johnson) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Error opening a file. In-Reply-To: <86sn1jcon5.fsf@blue.stonehenge.com> References: <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> Message-ID: <5.1.0.14.0.20020813094651.01afc120@localhost> At 10:29 PM 8/12/2002 -0700, you wrote: > >>>>> "Russ" == Russ Johnson writes: > >Russ> I have the following line in my script: >Russ> my $input = new IO::File ("< $location/$area/$msg.xml"); > >Russ> Which gives me the following error: > >Russ> Use of uninitialized value in concatenation (.) or string at >Russ> /home/httpd/cgi-bin/readmsg.pl line 55. > >Russ> I've verified that $location, $area and $msg all have values. > >If that's the error you're getting, I'm betting something there is not >as you say. I'd bet the rent on it. Either you aren't running >the script you think you are, or you aren't verifying that all >of those values are defined() true, or something is broken with your >Perl. > >But it is not as you say. OK, I'm an idiot newbie... I figured out what was happening, and it wasn't anything to do with that line. It ran fine from the command line with two parameters, but didn't run from the web browser. So I looked at my code to read the parameters. That was fine. The problem was that I didn't create the URL properly in the calling script. I put "?" between my parameters. With an ampersand between the parameters, it works fine... Russ Johnson http://www.dimstar.net Good pitching will always stop good hitting, and vice versa. - Casey Stengel From merlyn at stonehenge.com Tue Aug 13 12:58:17 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Error opening a file. In-Reply-To: <5.1.0.14.0.20020813094651.01afc120@localhost> References: <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> <5.1.0.14.0.20020812210839.00b692a0@mail.localnet.dimstar.net> <5.1.0.14.0.20020813094651.01afc120@localhost> Message-ID: <86u1lybpza.fsf@blue.stonehenge.com> >>>>> "Russ" == Russ Johnson writes: Randal> But it is not as you say. Russ> I figured out what was happening, and it wasn't anything to do with that line. Russ> It ran fine from the command line with two parameters, but didn't run Russ> from the web browser. So I looked at my code to read the Russ> parameters. That was fine. The problem was that I didn't create the Russ> URL properly in the calling script. I put "?" between my parameters. Russ> With an ampersand between the parameters, it works fine... Bingo. In general, if the problem *doesn't make sense*, then something about the testing environment (or the operating conditions) should be inferred. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From ben_a_marcotte at yahoo.com Wed Aug 14 11:45:17 2002 From: ben_a_marcotte at yahoo.com (Ben Marcotte) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] August must be BBQ month... Message-ID: <20020814164517.16217.qmail@web14602.mail.yahoo.com> This month marks a special 20th anniversary for me. No, nothing involving a marriage or relationship, at least of a human sort that is. See, it's been twenty years since I started programming (yes that would be at the tender age of 9), thus embarking on the path to utter and complete geekhood, and it's all been downhill from there ;-) To commemorate, I'm having a party/bbq thingy at the house and PDX.pm is invited! Where: 8395 SW Garden Home Road (see directions below) When: Saturday, August 17th about 6 PM till whenever... Please RSVP so I can plan ahead! I'm providing burgers, (both meat and veggie), burger fixings, chips, dip, beer and soft drinks. If you'd like to bring your own anything else, it is welcome. >>>>> DIRECTIONS <<<<< From jkeroes at eli.net Thu Aug 15 11:57:52 2002 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Meeting followup Message-ID: <20020815165752.GD5128@eli.net> I would like to improve the last night's presentation about building modules. If you attended and have questions unanswered, please email me. I would like to summarize and have a v1.1 of the lecture. errata: 1. I was using a forked copy of ExtUtils::ModuleMaker. There is no script called "newmodule", it's currently called "eumm", short for the module name. Maybe newmodule will also exist in the new revision of this module, we'll see. 2. I glossed over file/directory purposes. This assumes you've used ExtUtils::ModuleMaker to create the module. They are: .cvsignore - files that CVS shouldn't keep track of Changes - a log of major bugfixes & other changes LICENSE - Perl's Artistic license by default, configurable MANIFEST - updated by running `make manifest` MANIFEST.SKIP - files that shouldn't be distributed Makefile.PL - creates a Makefile README - basic installation and use information lib/ - location for .pm (perl module) files t/ - location for .t (test) files 3. I didn't drill in the point that all you need to do to start developing modules is start with the proper framework, such as the one that ExtUtils::ModuleMaker provides. That's it. Really, it's just that simple. 4. To the guy who had never heard of CPAN - I missed you afterwards for beer. CPAN is both a place to get Perl modules as well as a module that downloads and installs them for you. Get started at http://search.cpan.org/ Thanks, -Joshua From tex at off.org Thu Aug 15 14:28:51 2002 From: tex at off.org (Austin Schutz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Meeting followup In-Reply-To: <20020815165752.GD5128@eli.net>; from jkeroes@eli.net on Thu, Aug 15, 2002 at 09:57:52AM -0700 References: <20020815165752.GD5128@eli.net> Message-ID: <20020815122851.A4023@gblx.net> On Thu, Aug 15, 2002 at 09:57:52AM -0700, Joshua Keroes wrote: > > I would like to improve the last night's presentation about building modules. > If you attended and have questions unanswered, please email me. I would like > to summarize and have a v1.1 of the lecture. > For those of us who couldn't make the lecture, is the presentation v1.0 up somewhere? Sounds like a cool lecture, sorry I missed it. Austin From gminter at hevanet.com Sat Aug 17 19:54:34 2002 From: gminter at hevanet.com (Greg Minter) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Meeting followup References: <20020815165752.GD5128@eli.net> Message-ID: <3D5EF04A.74F8CA4@hevanet.com> > 4. To the guy who had never heard of CPAN - I missed you afterwards for > beer. CPAN is both a place to get Perl modules as well as a module > that downloads and installs them for you. Get started at > http://search.cpan.org/ I'm familiar with CPAN. It was the moule CPAN.pm that I wasn't familiar with. I've used ActiveState's PPM program instead. Does the ActiveState implementation of CPAN.pm work well with windows? -Greg From chromatic at wgz.org Sun Aug 18 22:48:40 2002 From: chromatic at wgz.org (chromatic) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Meeting followup In-Reply-To: <3D5EF04A.74F8CA4@hevanet.com> References: <20020815165752.GD5128@eli.net> <3D5EF04A.74F8CA4@hevanet.com> Message-ID: <200208182048.40953.chromatic@wgz.org> On Saturday 17 August 2002 17:54, Greg Minter wrote: > I'm familiar with CPAN. It was the moule CPAN.pm that I wasn't familiar > with. I've used ActiveState's PPM program instead. Does the ActiveState > implementation of CPAN.pm work well with windows? It does, with two provisios. First, you must have a 'make' utility installed. 'nmake.exe' works. You'll also be limited to pure-Perl modules, unless you have Visual Studio available to compile XS modules. -- c From ckuskie at dalsemi.com Mon Aug 19 11:53:21 2002 From: ckuskie at dalsemi.com (Colin Kuskie) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Meeting followup Message-ID: <20020819095321.A22492@dalsemi.com> On Sun, Aug 18, 2002 at 08:48:40PM -0700, chromatic wrote: > On Saturday 17 August 2002 17:54, Greg Minter wrote: > > > I'm familiar with CPAN. It was the moule CPAN.pm that I wasn't familiar > > with. I've used ActiveState's PPM program instead. Does the ActiveState > > implementation of CPAN.pm work well with windows? > > It does, with two provisios. First, you must have a 'make' utility installed. > 'nmake.exe' works. You'll also be limited to pure-Perl modules, unless you > have Visual Studio available to compile XS modules. Add 1 more provision. When you first use CPAN.pm it will ask you for a list of CPAN mirrors that are close to you. Whatever you do, do NOT choose sourceforge.net. A while ago they changed how their downloads work, and it completely messed up my CPAN.pm installation. I had to go and manually hack CPAN/Config.pm in order to get it working again. Colin From cp at onsitetech.com Mon Aug 19 17:22:38 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Next Perl Mongers meeting References: <20020819095321.A22492@dalsemi.com> Message-ID: <004001c247ce$ed29cd50$1a01a8c0@ot.onsitetech.com> Hi all, I have a tentative confirmation of a presenter for the next meeting: Brian Ingerson. He has several topics that he's debating so he'll get back to me soon regarding the topic. The next meeting is scheduled for 9/11. As I realize that this is a date of some significance, please let me know if this date is not going to work out and perhaps we can fudge it a little for September. -- Cheers, Curtis Poe Senior Programmer ONSITE! Technology, Inc. www.onsitetech.com 503-233-1418 Taking a-Business and Internet Technology To The Extreme! From merlyn at stonehenge.com Mon Aug 19 20:39:01 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Next Perl Mongers meeting In-Reply-To: <004001c247ce$ed29cd50$1a01a8c0@ot.onsitetech.com> References: <20020819095321.A22492@dalsemi.com> <004001c247ce$ed29cd50$1a01a8c0@ot.onsitetech.com> Message-ID: <86adniux56.fsf@blue.stonehenge.com> >>>>> "Curtis" == Curtis Poe writes: Curtis> The next meeting is scheduled for 9/11. As I realize that Curtis> this is a date of some significance, please let me know if Curtis> this date is not going to work out and perhaps we can fudge it Curtis> a little for September. It'd be ironic to cancel it twice in a row for 9/11. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From lemming at attbi.com Mon Aug 19 20:52:13 2002 From: lemming at attbi.com (Mark Morgan) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Next Perl Mongers meeting References: <20020819095321.A22492@dalsemi.com> <004001c247ce$ed29cd50$1a01a8c0@ot.onsitetech.com> <86adniux56.fsf@blue.stonehenge.com> Message-ID: <3D61A0CD.4000202@attbi.com> Randal L. Schwartz wrote: >>>>>>"Curtis" == Curtis Poe writes: >>>>> > > Curtis> The next meeting is scheduled for 9/11. As I realize that > Curtis> this is a date of some significance, please let me know if > Curtis> this date is not going to work out and perhaps we can fudge it > Curtis> a little for September. > > It'd be ironic to cancel it twice in a row for 9/11. :) The start of a tradition? -Mark From jasona at inetarena.com Mon Aug 26 20:37:46 2002 From: jasona at inetarena.com (Jason Annin-White) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Custom Ethernet frames Message-ID: <004701c24d6a$5b7b13e0$e186fc83@archer> Some associates of mine would like to put a couple of high end boxes on either side of a router and simulate a high traffic network so we can gather some statistics and do some tests. We would like to create Ethernet frames that carry various protocols, but would settle for just IP packets. It would require that the frames contained custom MAC addresses so we can simulate hundreds of sources and destinations. Can anybody point out a useful perl module or opensource test suite for this task? Jason White -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20020826/189ffc7d/attachment.htm From tex at off.org Tue Aug 27 00:39:47 2002 From: tex at off.org (Austin Schutz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Custom Ethernet frames In-Reply-To: <004701c24d6a$5b7b13e0$e186fc83@archer>; from jasona@inetarena.com on Mon, Aug 26, 2002 at 06:37:46PM -0700 References: <004701c24d6a$5b7b13e0$e186fc83@archer> Message-ID: <20020826223947.L1290@gblx.net> On Mon, Aug 26, 2002 at 06:37:46PM -0700, Jason Annin-White wrote: > Some associates of mine would like to put a couple of high end boxes on either side of a router and simulate a high traffic network so we can gather some statistics and do some tests. We would like to create Ethernet frames that carry various protocols, but would settle for just IP packets. It would require that the frames contained custom MAC addresses so we can simulate hundreds of sources and destinations. > > Can anybody point out a useful perl module or opensource test suite for this task? > > Jason White AFAIK there is no such tool. You might try using Inline with the C library 'libnet', which is also used as the basis for tcpdump, etc. Of course I'm probably wrong as usual and someone has already written a Perl interface for it. http://www.packetfactory.net/libnet Austin From tex at off.org Tue Aug 27 01:23:50 2002 From: tex at off.org (Austin Schutz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Custom Ethernet frames In-Reply-To: <20020826223947.L1290@gblx.net>; from tex@off.org on Mon, Aug 26, 2002 at 10:39:47PM -0700 References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> Message-ID: <20020826232350.M1290@gblx.net> On Mon, Aug 26, 2002 at 10:39:47PM -0700, Austin Schutz wrote: > On Mon, Aug 26, 2002 at 06:37:46PM -0700, Jason Annin-White wrote: > > Some associates of mine would like to put a couple of high end boxes on either side of a router and simulate a high traffic network so we can gather some statistics and do some tests. We would like to create Ethernet frames that carry various protocols, but would settle for just IP packets. It would require that the frames contained custom MAC addresses so we can simulate hundreds of sources and destinations. > > > > Can anybody point out a useful perl module or opensource test suite for this task? > > > > Jason White > > AFAIK there is no such tool. You might try using Inline with the > C library 'libnet', which is also used as the basis for tcpdump, etc. s/tcpdump/ping and traceroute/. tcpdump uses libpcap. Actually, there is a module - Net::RawIP - that has low level capabilities, but it's basically read only, as it also uses libpcap. You can peek at incoming ether frames but you can't build them. You may end up better off using an existing C based tool such as udpgen: http://www.fokus.gmd.de/research/cc/glone/employees/sebastian.zander/private/udpgen/ and modifying it to use random mac addrs. You would have better performance than you would be able to coax from perl anyway. Austin From tcaine at eli.net Tue Aug 27 14:17:05 2002 From: tcaine at eli.net (Todd Caine) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Custom Ethernet frames In-Reply-To: <20020826232350.M1290@gblx.net> References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> Message-ID: <20020827191705.GA27831@eli.net> Hi Austin, Check out http://packet.lucidx.com/. I believe the Ethernet, IP, TCP, and UDP modules work. Your miles may vary. Cheers, Todd On (Mon, Aug 26 23:23), Austin Schutz wrote: > On Mon, Aug 26, 2002 at 10:39:47PM -0700, Austin Schutz wrote: > > On Mon, Aug 26, 2002 at 06:37:46PM -0700, Jason Annin-White wrote: > > > Some associates of mine would like to put a couple of high end boxes on either side of a router and simulate a high traffic network so we can gather some statistics and do some tests. We would like to create Ethernet frames that carry various protocols, but would settle for just IP packets. It would require that the frames contained custom MAC addresses so we can simulate hundreds of sources and destinations. > > > > > > Can anybody point out a useful perl module or opensource test suite for this task? > > > > > > Jason White > > > > AFAIK there is no such tool. You might try using Inline with the > > C library 'libnet', which is also used as the basis for tcpdump, etc. > > s/tcpdump/ping and traceroute/. tcpdump uses libpcap. Actually, there > is a module - Net::RawIP - that has low level capabilities, but it's basically > read only, as it also uses libpcap. You can peek at incoming ether frames but > you can't build them. > You may end up better off using an existing C based tool such as > udpgen: > > http://www.fokus.gmd.de/research/cc/glone/employees/sebastian.zander/private/udpgen/ > > and modifying it to use random mac addrs. You would have better > performance than you would be able to coax from perl anyway. > > Austin > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From pate at eylerfamily.org Wed Aug 28 16:04:42 2002 From: pate at eylerfamily.org (Pat Eyler) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] RFP for Perl work on existing project Message-ID: The Nelsonville, Ohio, Public Library has recently announced that they will be migrating to Koha, a GPL'd library software system () which is written in Perl. They have decided to contribute to the ongoing development of Koha and have released an RFP to solicit bids to work on full MARC support for the 1.4 release, the RFP is available at (a copy is also included below). I'd encourage interested parties to read carefully through the RFP and to join the koha-devel mailing list (). It may also be worthwhile to join the #koha channel at irc.katipo.co.nz to discuss the project in general or MARC support specifically. If you know anyone else that might be interested in responding to the RFP, please feel free to forward it as appropriate. Further background on Nelsonville's announcement is at . For more information, please feel free to contact me by email at info@koha.org. thanks, -pate Pat Eyler Kaitiaki/manager the Koha project http://www.koha.org REQUEST For PROPOSAL -- MARC 21 record support for Koha (www.koha.org) The Nelsonville Public Library invites all interested parties to submit proposals in response to the following request. Proposals may be submitted in any format, but should carefully answer all questions in the request. Proposals should be sent to Stephen Hedges, Director, Nelsonville Public Library, e-mail nelpl@athenscounty.lib.oh.us, fax 740-753-3543, mail 95 W. Washington Street, Nelsonville, Ohio 45764. Proposals are due no later than 8:00 A.M. Eastern Daylight Time, September 30, 2002. Any responses made in proposals from interested parties may be incorporated as part of a final agreement. BACKGROUND The Nelsonville Public Library is a public library system consisting of seven libraries serving the residents of Athens County, Ohio, USA, with 36,000 active borrowers and over 250,000 items in the collections. The library has made plans to switch from its current library automation system to Koha, but only if Koha has certain required capabilities. Among these is the ability to store and retrieve item records in MARC 21 format at the (Full) National Record Level. Accordingly, the Library is seeking proposals from parties who are capable of modifying the current Koha code to provide this capability. Proposals will be evaluated by a committee of five Library staff members, and a contract will be negotiated with the submitter of the successful proposal. Please note that the Nelsonville Public Library does not expect to fund the entire development process, but is instead offering a financial reward to encourage development of Koha to be able to handle MARC 21 format. Nelsonville Public Library may elect to share some of this financial burden with other agencies as it sees fit. SPECIAL CONSIDERATIONS Nelsonville Public Library realizes that several people/groups may wish to combine resources to fulfill the requirements of this RFP. The Library is aware of the special nature of Open Source software projects, which encourages wide participation in the development process, and is thus amenable to proposals which divide the work between parties. In such a case, however, the Library prefers to receive only one combined proposal, with payment going to only one person or organization. If no acceptable combined proposal is received, then the library will entertain partial proposals from several persons or organizations that can demonstrate a plan to coordinate their efforts toward achieving the intended goal. SELECTION CRITERA Proposals will be evaluated on the basis of cost, qualifications of the programmer(s), time to delivery, ease of integration of the proposed code into the current Koha software, and ease of upgrading the delivered software to incorporate future changes to the MARC formats. The Library also intends to share information from proposals with the current Koha development team, in order to better judge the compatibility of the proposals with the overall Koha development plan. REQUIRED INFORMATION - How will you modify current Koha tables and/or scripts to accomodate MARC 21 National (Full) Level Record Requirements? (See http://lcweb.loc.gov/marc/bibliographic/nlr/). Please provide enough detail so that the committee may judge the viability of your plan, but do not submit sample tables and/or scripts. - Who will undertake this work? - What are the qualifications of the person(s) doing this work? - How have you been involved in previous Koha development? - How long will it take to complete this work? - How much will you charge for this work? (in US Dollars, please) - How will you coordinate your work with the existing work on MARC for the 1.4 release of Koha? From cp at onsitetech.com Wed Aug 28 17:03:49 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> Message-ID: <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> Hi all, I just had a non-member submission to the list that I went ahead and approved. This was "sort of" a job announcement so I was leery about allowing it, but I assumed that enough people are looking for work that I went ahead and let it through. I reject most non-member submissions as they are spam. Other news: I found out that we don't have a projector (much less a projection screen) available for September 11th. This is due to some of our employees flying out to a conference. I'm open to suggestions (I'll contact the presenter, also). We can: 1. Move the date of the presentation 2. Give Brian Ingerson some crayons and construction paper 3. Crowd around my desk at work and watch him do the presentation there 4. Move the presentation 5. Cancel or have a social (noooooooooo!) I'm in favor of 2, but I suspect that Ingy will object. -- Cheers, Curtis Poe Senior Programmer ONSITE! Technology, Inc. www.onsitetech.com 503-233-1418 Taking e-Business and Internet Technology To The Extreme! From tex at off.org Wed Aug 28 17:24:13 2002 From: tex at off.org (Austin Schutz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... In-Reply-To: <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com>; from cp@onsitetech.com on Wed, Aug 28, 2002 at 03:03:49PM -0700 References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> Message-ID: <20020828152413.V1290@gblx.net> On Wed, Aug 28, 2002 at 03:03:49PM -0700, Curtis Poe wrote: > Hi all, > > I just had a non-member submission to the list that I went ahead and > approved. This was "sort of" a job announcement so I was leery about > allowing it, but I assumed that enough people are looking for work that I > went ahead and let it through. I reject most non-member submissions as they > are spam. > > Other news: I found out that we don't have a projector (much less a > projection screen) available for September 11th. This is due to some of our > employees flying out to a conference. I'm open to suggestions (I'll contact > the presenter, also). > > We can: > > 1. Move the date of the presentation I'd vote for one, since sept 11 is probably going to be unavailable for many folks anyway. Austin From gcheong at acm.org Wed Aug 28 17:42:53 2002 From: gcheong at acm.org (Greg Cheong) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> Message-ID: <000a01c24ee4$412a5ac0$6501a8c0@isolde> How about a flashlight and shadow puppets? ;^). Cheers, Greg ----- Original Message ----- From: "Curtis Poe" To: Cc: "Brian Ingerson" Sent: Wednesday, August 28, 2002 3:03 PM Subject: [Pdx-pm] Various things ... > Hi all, > > I just had a non-member submission to the list that I went ahead and > approved. This was "sort of" a job announcement so I was leery about > allowing it, but I assumed that enough people are looking for work that I > went ahead and let it through. I reject most non-member submissions as they > are spam. > > Other news: I found out that we don't have a projector (much less a > projection screen) available for September 11th. This is due to some of our > employees flying out to a conference. I'm open to suggestions (I'll contact > the presenter, also). > > We can: > > 1. Move the date of the presentation > 2. Give Brian Ingerson some crayons and construction paper > 3. Crowd around my desk at work and watch him do the presentation there > 4. Move the presentation > 5. Cancel or have a social (noooooooooo!) > > I'm in favor of 2, but I suspect that Ingy will object. > > -- > Cheers, > Curtis Poe > Senior Programmer > ONSITE! Technology, Inc. > www.onsitetech.com > 503-233-1418 > > Taking e-Business and Internet Technology To The Extreme! > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > From cp at onsitetech.com Wed Aug 28 18:32:52 2002 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> <000a01c24ee4$412a5ac0$6501a8c0@isolde> Message-ID: <003901c24eeb$3c4e7110$1a01a8c0@ot.onsitetech.com> ----- Original Message ----- From: "Greg Cheong" To: Sent: Wednesday, August 28, 2002 3:42 PM Subject: Re: [Pdx-pm] Various things ... > How about a flashlight and shadow puppets? ;^). > > Cheers, > Greg Tempting...tempting... In the meantime, my CTO informs me that we just ordered another projector and it should be here tomorrow. If that's the case, then my email was pretty much a moot point. -- Cheers, Curtis Poe Senior Programmer ONSITE! Technology, Inc. www.onsitetech.com 503-233-1418 Taking e-Business and Internet Technology To The Extreme! From jkeroes at eli.net Thu Aug 29 10:28:06 2002 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... In-Reply-To: <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> Message-ID: <20020829152806.GB16868@eli.net> On (Wed, Aug 28 15:03), Curtis Poe wrote: > [For the 9/11 meeting] we can: > > 1. Move the date of the presentation I vote to move the date. I doubt people will really be in a coding mood anyway. > 2. Give Brian Ingerson some crayons and construction paper I vote for macaroni and gloo. > 5. Cancel or have a social (noooooooooo!) I vote for turning 9/11 into a day of rememberence. Having a social would be /weeeeird/. -J From steven_brown at hp.com Thu Aug 29 12:28:20 2002 From: steven_brown at hp.com (BROWN,STEVEN K (HP-Vancouver,ex1)) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... Message-ID: <77261E830267D411BD4D00902740AC250B522DDE@xvan01.vcd.hp.com> People, I agree with Joshua. We should move the date. 9-11 is going to be too sad to do much other than remember that tragedy. ========================================= __ ?????????? / /\???? ????????? / /? \?????Steven K Brown ? __???? /_/ /\ \????Firmware Technician ?/_/\? __\ \ \_\ \???18110 SE 34th Street ?\ \ \/ /\\ \ \/ /???Vancouver, WA 98683 ? \ \ \/? \\ \? /????TN: (360) 212-4432 ?? \ \? /\ \\ \ \????steven_brown@hp.com \ \ \ \ \\ \ \?? ???? \ \ \_\/ \ \ \ ????? \ \ \??? \_\/? ?????? \_\/???????? ???????????????????? ? i? n? v? e? n? t ========================================= https://ecardfile.com/id/steven_brown From merlyn at stonehenge.com Thu Aug 29 12:57:34 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... In-Reply-To: <20020829152806.GB16868@eli.net> References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> <20020829152806.GB16868@eli.net> Message-ID: <868z2pv981.fsf@red.stonehenge.com> >>>>> "Joshua" == Joshua Keroes writes: Joshua> On (Wed, Aug 28 15:03), Curtis Poe wrote: Joshua> I vote to move the date. I doubt people will really be in a coding mood anyway. And what date would you have 9/11 fall on? :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From chromatic at wgz.org Thu Aug 29 13:01:31 2002 From: chromatic at wgz.org (chromatic) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... In-Reply-To: <868z2pv981.fsf@red.stonehenge.com> References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020829152806.GB16868@eli.net> <868z2pv981.fsf@red.stonehenge.com> Message-ID: <200208291101.31233.chromatic@wgz.org> On Thursday 29 August 2002 10:57, Randal L. Schwartz wrote: > And what date would you have 9/11 fall on? :) We could go European, and claim it's 9 November. Otherwise, it's possible someone forgot that months start at 0, and we end up with 11 October. Neither is a Wednesday. -- c From mikeraz at PATCH.COM Thu Aug 29 13:34:10 2002 From: mikeraz at PATCH.COM (mikeraz@PATCH.COM) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... In-Reply-To: <20020829152806.GB16868@eli.net>; from jkeroes@eli.net on Thu, Aug 29, 2002 at 08:28:06AM -0700 References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> <20020829152806.GB16868@eli.net> Message-ID: <20020829113410.A22028@patch.com> On Thu, Aug 29, 2002 at 08:28:06AM -0700, Joshua Keroes typed: > I vote for turning 9/11 into a day of rememberence. Having a social would be > /weeeeird/. What do you do on Memorial Day Weekend? The time to honor those who died at war? What do you do on Labor Day Weekend? Time time that (some people) honor the workers who got their heads busted while striking for better working conditions? -- Michael Rasmussen aka mikeraz Be appropriate && Follow your curiosity http://www.patch.com/ http://wiki.patch.com/ http://blog.patch.com/sandbox/ The fortune cookie says: Fakir, n: A psychologist whose charismatic data have inspired almost religious devotion in his followers, even though the sources seem to have shinnied up a rope and vanished. From jkeroes at eli.net Thu Aug 29 13:54:32 2002 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... In-Reply-To: <868z2pv981.fsf@red.stonehenge.com> References: <004701c24d6a$5b7b13e0$e186fc83@archer> <20020826223947.L1290@gblx.net> <20020826232350.M1290@gblx.net> <20020827191705.GA27831@eli.net> <000d01c24ede$ce06bed0$1a01a8c0@ot.onsitetech.com> <20020829152806.GB16868@eli.net> <868z2pv981.fsf@red.stonehenge.com> Message-ID: <20020829185432.GA7716@eli.net> On (Thu, Aug 29 10:57), Randal L. Schwartz wrote: > >>>>> "Joshua" == Joshua Keroes writes: > > Joshua> On (Wed, Aug 28 15:03), Curtis Poe wrote: > > Joshua> I vote to move the date. I doubt people will really be in a coding mood anyway. > > And what date would you have 9/11 fall on? :) Any other date. 9/11 is my mom's birthday. Trivial it may seem, if I had a choice, I'd pick a different day. Offhand, 2/30 sounds like a decent one. -J From lemming at attbi.com Thu Aug 29 15:28:44 2002 From: lemming at attbi.com (lemming@attbi.com) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] Various things ... Message-ID: <20020829202844.EKFI19514.rwcrmhc52.attbi.com@rwcrwbc57> I vote to leave the date of the meeting on Sep 11. From gabrielle.roth at xo.com Fri Aug 30 12:36:46 2002 From: gabrielle.roth at xo.com (Roth, Gabrielle) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. Message-ID: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> Hi all, I am having a problem understanding what I need to do to get some hash keys to sort correctly. background: I have a script that uses snmp to collect information (port names, duplex settings, etc) about network switches; ultimately this information is transferred to monitoring and mapping software. Currently I am gathering this information into several hashes; the keys for the hashes are the module.port assignment on the switch (eg 1.1, 1.2, etc). ---begin code snippet--- #!/usr/local/bin/perl #Note: this hash is created when the script is run. #I hard-coded it in here to simplify the problem (that was my theory, at least) %portName = ( 1.1 => "smith", 1.3 => "gunks", 1.4 => "horsethief", 1.10 => "tahquitz", 1.12 => "carderock", 2.1 => "seneca", 2.2 => "newriva", 2.14 => "lincoln", ); #from eg http://www.perlfect.com/articles/sorting.shtml @key_array = sort {$a <=> $b} keys(%portName); print ("port\tname\n"); foreach $port (@key_array) { print ("$port\t$portName{$port}\n"); } ---end code snippet--- Ideally, my final output would look something like this: port name 1.1 smith 1.3 gunks 1.4 horsethief 1.10 tahquitz 1.12 carderock 2.1 seneca 2.2 newriva 2.14 lincoln Instead, I get this: port name 1.1 tahquitz 1.12 carderock 1.3 gunks 1.4 horsethief 2.1 seneca 2.14 lincoln 2.2 newriva I have two problems: 1. Obviously, the order isn't right. I thought the <=> operator would do a numerical sort, but apparently that's just for integers? I'm not any better off than if I just did a regular sort. 2. One of (1.1|1.10) goes missing; I thought maybe because the <=> evaluated them as equivalent, but it does this with the "cmp" operator as well. I tried quoting the keys, but that didn't help either. What am I missing? -gabrielle "I don't mind the rat race but I could do with a little more cheese." From chromatic at wgz.org Fri Aug 30 12:51:09 2002 From: chromatic at wgz.org (chromatic) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. In-Reply-To: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> References: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> Message-ID: <200208301051.09413.chromatic@wgz.org> On Friday 30 August 2002 10:36, Roth, Gabrielle wrote: > 1. Obviously, the order isn't right. I thought the <=> operator would do > a numerical sort, but apparently that's just for integers? I'm not any > better off than if I just did a regular sort. 1.10 is numerically equivalent to 1.1, which is less than 1.2. This *is* a standard numerical sort. You will need to create your own sorting function that respects the semantics you want. Off the top of my head, it might be: sub sort_version { return 0 if $a eq $b; my $first = [ split/\./, $a ]; my $second = [ split /\./, $b ]; return -1 if $first->[0] < $second->[0]; return 1 if $first->[0] > $second->[0]; return -1 if $first->[1] < $second->[1]; return 1; } That's completely untested, and I usually have to look in perldoc -f sort to get these right. Maybe Tom Phoenix will be along shortly with a much better example and explanation. :) > 2. One of (1.1|1.10) goes missing; I thought maybe because the <=> > evaluated them as equivalent, but it does this with the "cmp" operator as > well. I tried quoting the keys, but that didn't help either. They're numerically equivalent, so they both evaluate to 1.1. I would be highly surprised if you had both in your hash. I find it very surprising that quoting them didn't make a difference, and would like to see an example of this. -- c From plumpy at krimedawg.org Fri Aug 30 13:08:46 2002 From: plumpy at krimedawg.org (Michael P) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. In-Reply-To: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> Message-ID: On Fri, 30 Aug 2002, Roth, Gabrielle wrote: > 1. Obviously, the order isn't right. I thought the <=> operator would do a > numerical sort, but apparently that's just for integers? I'm not any better > off than if I just did a regular sort. A sort function like this would work: sub verscmp { @a = split /\./, $a; @b = split /\./, $b; $a[0] != $b[0] ? $a[0] <=> $b[0] : $a[1] <=> $b[1]; } First you compare the part before the decimal and if they're the same, you compare the part after the decimal. The key here, of course, is that you DON'T want a numerical sort. You want a fake version-number-style sort. Remember, 1.12 IS less than 1.2! Perl was doing it correctly, you're just don't actually want a numerical sort. > 2. One of (1.1|1.10) goes missing; I thought maybe because the <=> > evaluated them as equivalent, but it does this with the "cmp" operator as > well. I tried quoting the keys, but that didn't help either. The problem is that the value is getting chopped at hash creation time. You need to do this (quoting the hash keys): %portName = ( "1.1" => "smith", "1.10" => "tagquitz", ... ); From gabrielle.roth at xo.com Fri Aug 30 13:14:02 2002 From: gabrielle.roth at xo.com (Roth, Gabrielle) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. Message-ID: <45EDA71CFF25D411A2E400508B6FC52A04619069@orportexch1.internal.nextlink.net> >You will need to create your own sorting function >that respects the semantics you want. Phooey. That's what I was afraid of. Thanks for the example, I will do more research. >> 2. One of (1.1|1.10) goes missing; I thought maybe because the <=> >> evaluated them as equivalent, but it does this with the >"cmp" operator as >> well. I tried quoting the keys, but that didn't help either. > >They're numerically equivalent, so they both evaluate to 1.1. >I would be highly surprised if you had both in your hash. The keys for the hash are the ports on a network switch, numbered 1/1, 1/2...1/24,2/1,2/2,...2/24...etc. 1/1, 1/10, 1/2, and 1/20 will all occur. The utility that I am using to gather the data (snmp) returns these numbers as 1.1, 1.2 etc, so I do end up with both 1.1 and 1.10 in my hash. >I find it very surprising that quoting them didn't make a >difference, and would like to see an example of this. You are right, it solves the problem of the disappearing element (doesn't help my sort though!). I am probably losing my mind from looking at this for too long. ;) -gabrielle "It's been lovely, but I must scream now." From gabrielle.roth at xo.com Fri Aug 30 13:21:32 2002 From: gabrielle.roth at xo.com (Roth, Gabrielle) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. Message-ID: <45EDA71CFF25D411A2E400508B6FC52A0461906A@orportexch1.internal.nextlink.net> >First you compare the part before the decimal and if they're >the same, you >compare the part after the decimal. The key here, of course, >is that you >DON'T want a numerical sort. You want a fake >version-number-style sort. > >Remember, 1.12 IS less than 1.2! Perl was doing it correctly, >you're just >don't actually want a numerical sort. Well, duh. I have definitely been looking at this for too long, when I am thinking that port numbers = real numbers. Thanks for the tip. -gabrielle "It's been lovely, but I must scream now." From rb-pdx-pm at redcat.com Fri Aug 30 13:21:35 2002 From: rb-pdx-pm at redcat.com (Tom Phoenix) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. In-Reply-To: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> Message-ID: On Fri, 30 Aug 2002, Roth, Gabrielle wrote: > #Note: this hash is created when the script is run. > #I hard-coded it in here to simplify the problem (that was my theory, at > least) That may explain this... > %portName = ( > 1.1 => "smith", > 1.10 => "tahquitz", The big arrow implicitly quotes a bareword to the left. But 1.10 is not a bareword, so that doesn't work. That second one files "tahquitz" under a key of "1.1", wiping out your previous entry. > 2. One of (1.1|1.10) goes missing; ...and now you know where it went. :-) Others have posted some methods of doing the sort which should work, although I haven't looked too closely. But maybe you should simplify the problem. Instead of 1.1, use 1.01 and your life will be that much easier. (Of course, if you ever have to go past 1.99, you'll regret that. But I have a hunch that this should help.) Good luck with it! --Tom Phoenix From tkil at scrye.com Fri Aug 30 14:08:23 2002 From: tkil at scrye.com (Tkil) Date: Mon Aug 2 21:34:12 2004 Subject: [Pdx-pm] sort issues. In-Reply-To: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> References: <45EDA71CFF25D411A2E400508B6FC52A04619068@orportexch1.internal.nextlink.net> Message-ID: >>>>> "GR" == Gabrielle Roth writes: GR> 1. Obviously, the order isn't right. I thought the <=> operator GR> would do a numerical sort, but apparently that's just for GR> integers? I'm not any better off than if I just did a regular GR> sort. The general case of this is the same problem as "sorting" the parts of a document (or, more precisely, the outline of its headers). This came up on #perl a few years back: http://slinky.scrye.com/~tkil/perl/#rev-sort Basically, you split each key into its parts, and then compare those components in order from most significant to least significant. I do wonder if, in this case, you could leverage the funky dot notation that showed up in perl 5.6... Well, maybe, but it looks hairy. GR> 2. One of (1.1|1.10) goes missing; I thought maybe because the GR> <=> evaluated them as equivalent, but it does this with the GR> "cmp" operator as well. I tried quoting the keys, but that GR> didn't help either. If it wasn't clear from the previous responses, you need to quote the keys when you're constructing the hash: | $ perl -lwe '%h = ( 1.1 => "foo", 1.10 => "bar" ); $, = "|"; print %h' | 1.1|bar | $ perl -lwe '%h = ( "1.1" => "foo", "1.10" => "bar" ); $, = "|"; print %h' | 1.1|foo|1.10|bar t. From jeff at vpservices.com Thu Aug 22 20:36:57 2002 From: jeff at vpservices.com (Jeff Zucker) Date: Wed Aug 4 00:05:40 2004 Subject: Perl help via pdx list -- NOT (was Re: Mail list predators) References: <3D3C866A.7050001@inetarena.com> <3D3CADBC.1040700@inetarena.com> <3D3CA9B2.10209@attbi.com> Message-ID: <3D6591B9.3010709@vpservices.com> My $0.02 is that c.l.p.* and perl monks and #perl and other places are the best place to get advice on particular perl programming issues. I would rather see this pdx-pm list be reserved for things not found on those places e.g. a) info about the pdx mongers meetings; b) tech stuff related to our being in Portland; c) questions/problems related to modules and ideas presented at our tech meetings; d) other perl issues that are particularly dear to our own local community (and we'll need to experiment to find out what those are). Obviously, we need some leaway for "I am at my wits end and I tried a bunch of other things and you gals and guys are my neighbors so please help". But I wouldn't like to see this list regularly used as a helpdesk or as a substitute for one of the other fora. Yeah we're lucky to have Randal and Tom and the rest of these whiz kids locally, but let's not waste that on everyday scripting issues that are dealt with other places. And please, please, please, let's not get into the recursive meta-commentary thing that fills c.l.p.m (he says, making a a recursive meta-comment himself). -- Jeff TIMTOWTDI