From perl-pm at joshheumann.com Tue May 4 18:04:38 2004 From: perl-pm at joshheumann.com (Josh Heumann) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting Message-ID: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> We are without a speaker for this month. The meeting is a week from tomorrow, 6:30pm at Free Geek. Who would like to volunteer? Josh From joe at radiojoe.org Tue May 4 19:00:56 2004 From: joe at radiojoe.org (Joe Oppegaard) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> Message-ID: On Tue, 4 May 2004 at 5:04pm -0600, Josh Heumann wrote: > We are without a speaker for this month. The meeting is a week from > tomorrow, 6:30pm at Free Geek. Who would like to volunteer? > I've often thought that a combination of ~damian/bin and Lightning Talks would be cool. It seems like I usually pick up some small good idea when I use someone else's machine or watch them working in their environment. People could just hook their laptops up to the projector and show a few of their favorite ways they keep efficient. Be it editor config files, ~/bin, GUI layout, e-mail organization, perl helper scripts, whatever. I'm sure most of us like to be as efficient as possible, and even though it can be tough to change habits, it's nice to see how others approach the same common problem of being productive. You can count me as one of the people willing to talk. Is anyone else interested? Maybe it's just the nosey part of me coming out to say hi. :) -Joe Oppegaard From david at kineticode.com Tue May 4 19:30:19 2004 From: david at kineticode.com (David Wheeler) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> Message-ID: <63548AA0-9E2B-11D8-B5F8-000A95972D84@kineticode.com> On May 4, 2004, at 4:04 PM, Josh Heumann wrote: > We are without a speaker for this month. The meeting is a week from > tomorrow, 6:30pm at Free Geek. Who would like to volunteer? I could do my Bricolage presentation. I've given it at a number of conferences and for a number of organizations in the last year. It debuted at YAPC last summer. It takes about 90-120 mins., depending on the number of questions. Interested? Regards, David From david at kineticode.com Tue May 4 19:39:17 2004 From: david at kineticode.com (David Wheeler) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <63548AA0-9E2B-11D8-B5F8-000A95972D84@kineticode.com> References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> <63548AA0-9E2B-11D8-B5F8-000A95972D84@kineticode.com> Message-ID: On May 4, 2004, at 5:30 PM, David Wheeler wrote: >> We are without a speaker for this month. The meeting is a week from >> tomorrow, 6:30pm at Free Geek. Who would like to volunteer? > > I could do my Bricolage presentation. I've given it at a number of > conferences and for a number of organizations in the last year. It > debuted at YAPC last summer. It takes about 90-120 mins., depending on > the number of questions. Oh, you said a week from tomorrow? D'oh! I won't be in town! Damn, sorry for the tease! Regards, David From perl-pm at joshheumann.com Wed May 5 12:20:22 2004 From: perl-pm at joshheumann.com (Josh Heumann) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> Message-ID: <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> > I've often thought that a combination of ~damian/bin and Lightning Talks > would be cool. It seems like I usually pick up some small good idea > when I use someone else's machine or watch them working in their > environment. > > People could just hook their laptops up to the projector and show a few > of their favorite ways they keep efficient. Be it editor config files, > ~/bin, GUI layout, e-mail organization, perl helper scripts, whatever. > > I'm sure most of us like to be as efficient as possible, and even > though it can be tough to change habits, it's nice to see how others > approach the same common problem of being productive. This sounds like a good idea, is anyone else interested, or will it just be Joe up there spilling his brain? Josh From johnl at johnlabovitz.com Wed May 5 12:57:06 2004 From: johnl at johnlabovitz.com (John Labovitz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> Message-ID: <9F467334-9EBD-11D8-B0F5-003065D08C38@johnlabovitz.com> On 5 May 2004, at 10:20 AM, Josh Heumann wrote: > This sounds like a good idea, is anyone else interested, or will it > just > be Joe up there spilling his brain? I can do some brain-spilling, too. I could present a little tour of my all-singing, all-dancing hack of an IMAP-based email filter. Or something. -- John Labovitz Consulting, LLC http://mac.johnlabovitz.com johnl@johnlabovitz.com +1 503.949.3492 From curtis_ovid_poe at yahoo.com Wed May 5 12:58:56 2004 From: curtis_ovid_poe at yahoo.com (Ovid) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> Message-ID: <20040505175856.8923.qmail@web60806.mail.yahoo.com> --- Josh Heumann wrote: > > I'm sure most of us like to be as efficient as possible, and even > > though it can be tough to change habits, it's nice to see how others > > approach the same common problem of being productive. > > This sounds like a good idea, is anyone else interested, or will it just > be Joe up there spilling his brain? Yeah, I suppose I have a couple of things I can toss in. I have a shell script I use to set up a new Perl project the way I want it, copy some utilities, optionally check it into CVS, etc. It's not much, but it's something. Cheers, Curtis ===== Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ From david at kineticode.com Wed May 5 13:01:01 2004 From: david at kineticode.com (David Wheeler) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <9F467334-9EBD-11D8-B0F5-003065D08C38@johnlabovitz.com> References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> <9F467334-9EBD-11D8-B0F5-003065D08C38@johnlabovitz.com> Message-ID: <2B063889-9EBE-11D8-B5F8-000A95972D84@kineticode.com> On May 5, 2004, at 10:57 AM, John Labovitz wrote: > I can do some brain-spilling, too. I could present a little tour of > my all-singing, all-dancing hack of an IMAP-based email filter. Or > something. Oooh, damn, I'm sorry I'll miss that! David From tex at off.org Wed May 5 14:26:22 2004 From: tex at off.org (Austin Schutz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <20040505175856.8923.qmail@web60806.mail.yahoo.com> References: <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> <20040505175856.8923.qmail@web60806.mail.yahoo.com> Message-ID: <20040505192622.GA27483@gblx.net> On Wed, May 05, 2004 at 10:58:56AM -0700, Ovid wrote: > --- Josh Heumann wrote: > > > I'm sure most of us like to be as efficient as possible, and even > > > though it can be tough to change habits, it's nice to see how others > > > approach the same common problem of being productive. > > > > This sounds like a good idea, is anyone else interested, or will it just > > be Joe up there spilling his brain? > > Yeah, I suppose I have a couple of things I can toss in. I have a shell script I use to set up a > new Perl project the way I want it, copy some utilities, optionally check it into CVS, etc. It's > not much, but it's something. > That sounds cool. I've been wanting something which will take an existing directory layout of modules, unit tests, and executables and create a package out of them. I've looked at one or two that use Module::Build, but they seem to have weird assumptions about how they want things done. Austin From curtis_ovid_poe at yahoo.com Wed May 5 15:10:01 2004 From: curtis_ovid_poe at yahoo.com (Ovid) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <20040505192622.GA27483@gblx.net> Message-ID: <20040505201001.32894.qmail@web60804.mail.yahoo.com> --- Austin Schutz wrote: > That sounds cool. I've been wanting something which will take an > existing directory layout of modules, unit tests, and executables and create > a package out of them. I've looked at one or two that use Module::Build, > but they seem to have weird assumptions about how they want things done. My tool doesn't work that way. You specify something like 'new_project Some::Module' and it builds the structure for you. It's kind of like Module::Starter (http://www.perlmonks.org/index.pl?node_id=342564), but I've been using it for years and I'm just used to it. Cheers, Ovid ===== Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ From merlyn at stonehenge.com Wed May 5 15:17:40 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> References: <50196.130.94.162.208.1083711878.squirrel@www.joshheumann.com> <50082.130.94.162.208.1083777622.squirrel@www.joshheumann.com> Message-ID: <8665ba39y5.fsf@blue.stonehenge.com> >>>>> "Josh" == Josh Heumann writes: Josh> This sounds like a good idea, is anyone else interested, or will it just Josh> be Joe up there spilling his brain? I can walk through a parallel link checker or something. I just figured out how to make my most recent version work correctly under the latest Class::DBI. -- 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 bprew at logiccloud.com Thu May 6 01:11:31 2004 From: bprew at logiccloud.com (Ben Prew) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting In-Reply-To: <20040505175856.8923.qmail@web60806.mail.yahoo.com> References: <20040505175856.8923.qmail@web60806.mail.yahoo.com> Message-ID: <4099D713.5020502@logiccloud.com> Ovid wrote: > --- Josh Heumann wrote: > >>>I'm sure most of us like to be as efficient as possible, and even >>>though it can be tough to change habits, it's nice to see how others >>>approach the same common problem of being productive. >> >>This sounds like a good idea, is anyone else interested, or will it just >>be Joe up there spilling his brain? > > > Yeah, I suppose I have a couple of things I can toss in. I have a shell script I use to set up a > new Perl project the way I want it, copy some utilities, optionally check it into CVS, etc. It's > not much, but it's something. I have a script that deletes email using the groupwise web-based client. Of course this would mean that I would actually have to be there, unless Curtis wants to show off my script. > > Cheers, > Curtis > > ===== > Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm > Ovid http://www.perlmonks.org/index.pl?node_id=17000 > Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > From kellert at ohsu.edu Fri May 7 10:47:58 2004 From: kellert at ohsu.edu (Thomas J Keller) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] web form and perl question Message-ID: Hi all, I hope this isn't considered off-topic. For taking work requests at my lab we use a simple web form (calls yea old 'generic-formmail.pl' in cgi-bin), the script action is to send an email to the lab with the extracted parameter: value items. In the lab another script munges the email and the data is piped into other programs. The web form requires each sample name to be entered in a separate text box. Some clients have multiple samples that they'd like to be able to enter "en masse" i.e. as a batch. I'm considering allowing a file upload, but I'm worried about having to deal with an infinite number of formats to parse down the road. Are there any simple and safe ways to do batch data entry from a web form? Your experience and suggestions are humbly requested. Thanks, Tom K. Tom Keller, Ph.D. http://www.ohsu.edu/research/core kellert@ohsu.edu 503-494-2442 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 937 bytes Desc: not available Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20040507/8123925e/attachment.bin From merlyn at stonehenge.com Fri May 7 11:29:16 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] web form and perl question In-Reply-To: References: Message-ID: <86pt9gyzdy.fsf@blue.stonehenge.com> >>>>> "Thomas" == Thomas J Keller writes: Thomas> For taking work requests at my lab we use a simple web form (calls yea Thomas> old 'generic-formmail.pl' in cgi-bin), If that script says "Matt Wright" at the beginning, REPLACE IT IMMEDIATELY with stuff you would find at http://nms-cgi.sf.net/. -- 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 johnl at johnlabovitz.com Fri May 7 12:55:18 2004 From: johnl at johnlabovitz.com (John Labovitz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] web form and perl question In-Reply-To: References: Message-ID: On 7 May 2004, at 8:47 AM, Thomas J Keller wrote: > The web form requires each sample name to be entered in a separate > text box. Some clients have multiple samples that they'd like to be > able to enter "en masse" i.e. as a batch. I'm considering allowing a > file upload, but I'm worried about having to deal with an infinite > number of formats to parse down the road. Are there any simple and > safe ways to do batch data entry from a web form? "Simple and safe" and "web form" don't usually go together. ;) You'll want to check the web data regardless of the format that you allow -- just to make sure it really *is* in that format. And since you'll be doing that already, you can just enforce a particular style -- tab-delimited CSV, XML, etc. You could probably even use the appropriate parsing module to do simple validation. Eg, once the file is uploaded, do a test read using Text::TabFile (see CPAN) and make sure you have enough fields, they aren't too long, etc. I haven't done a whole lot of file-upload work, but the CGI::Simple module looks promising. Here's a relevant link: http://search.cpan.org/~jfreeman/Cgi-Simple-0.071/ Simple.pm#FILE_UPLOADS -- John Labovitz Consulting, LLC http://mac.johnlabovitz.com johnl@johnlabovitz.com +1 503.949.3492 From perl-pm at joshheumann.com Fri May 7 16:20:53 2004 From: perl-pm at joshheumann.com (Josh Heumann) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting reminder Message-ID: <33167.130.94.161.146.1083964853.squirrel@www.joshheumann.com> When: May 12th, 2004 6:30pm Where: Free Geek, 1741 SE 10th Ave Who: A whole bunch of people, talking about the little things in life. Scripts, cool modules, a book you've read. Whatever's on your mind. ** JoeOppegaard ** Ovid ** John Labovitz ** Randal Schwartz ** Anyone else who wants to (that can include you) Josh From raanders at acm.org Mon May 10 18:28:04 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Thank you Message-ID: A quick thank-you to all on this list that have provided support and help last few months. And a thank-you to those module writers that have made my job so much easier. About two hours ago I realized I needed a method to compare two CSS files and diff just didn't do it (given my experience level with diff.) I knew there was some way to read very simple CSS files into perl but couldn't think of a way to do it with my skill level. So I go to CPAN, start doing some searches and 'there it is' CSS::tiny. While deciding which module is the best for my needs I discover Config::Simple and fix another problem I have. Config files the masses can deal with. Rod -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" From curtis_ovid_poe at yahoo.com Tue May 11 10:53:17 2004 From: curtis_ovid_poe at yahoo.com (Ovid) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting reminder In-Reply-To: <33167.130.94.161.146.1083964853.squirrel@www.joshheumann.com> Message-ID: <20040511155317.49056.qmail@web60801.mail.yahoo.com> Regrettably, I won't be able to make it tomorrow after all. Sorry about that. Cheers, Ovid --- Josh Heumann wrote: > When: May 12th, 2004 6:30pm > > Where: Free Geek, 1741 SE 10th Ave > > Who: A whole bunch of people, talking about the little things in life. > Scripts, cool modules, a book you've read. Whatever's on your mind. > > ** JoeOppegaard > ** Ovid > ** John Labovitz > ** Randal Schwartz > ** Anyone else who wants to (that can include you) > > Josh > > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list ===== Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ From perl-pm at joshheumann.com Wed May 12 11:47:01 2004 From: perl-pm at joshheumann.com (Josh Heumann) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting tonight Message-ID: <50117.130.94.162.208.1084380421.squirrel@www.joshheumann.com> May Meeting When: May 12th, 2004 6:30pm (To-nite!) Where: Free Geek, 1741 SE 10th Ave Who: A whole bunch of people, talking about the little things in life o JoeOppegaard o John Labovitz o Randal Schwartz o Maybe Joshua Keroes o Anyone else who wants to If the meeting is short, we can always adjourn to the Lucky Lab early and make it a social meeting. Perl est gud. Josh __________________________ http://www.joshheumann.com From jgoalby at hotmail.com Wed May 12 15:03:57 2004 From: jgoalby at hotmail.com (John) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Escaping a character in a string from a file In-Reply-To: <50117.130.94.162.208.1084380421.squirrel@www.joshheumann.com> Message-ID: I have a file of regular expressions I want to match. I read in the file and then match each entry as such: if ($something =~ /$tomatch/i) I want to be able to specify something like ".pl" in the file so that I can match all perl files. Specifying .pl matches .apl. Is there a way I can escape the "." when it is in a file? I tried "\.pl", but it didn't work. Any pointers would be very much appreciated. Thanks John. From merlyn at stonehenge.com Wed May 12 15:20:55 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Escaping a character in a string from a file In-Reply-To: References: Message-ID: <86isf12y8z.fsf@blue.stonehenge.com> >>>>> "John" == John writes: John> I have a file of regular expressions I want to match. I read in the file John> and then match each entry as such: John> if ($something =~ /$tomatch/i) John> I want to be able to specify something like ".pl" in the file so that I can John> match all perl files. Specifying .pl matches .apl. Is there a way I can John> escape the "." when it is in a file? I tried "\.pl", but it didn't work. Uh, that should have, with the code you have above. Can you show an example of it not working? -- 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 jgoalby at hotmail.com Wed May 12 15:28:00 2004 From: jgoalby at hotmail.com (John) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Escaping a character in a string from a file In-Reply-To: <86isf12y8z.fsf@blue.stonehenge.com> Message-ID: Oh! I tried to recreate the problem in a simpler example and it worked. Obviously some side effect of something else I am doing. I will post my stupidity as soon as I find it. John. > -----Original Message----- > From: pdx-pm-list-bounces@mail.pm.org [mailto:pdx-pm-list- > bounces@mail.pm.org] On Behalf Of Randal L. Schwartz > Sent: Wednesday, May 12, 2004 1:21 PM > To: John > Cc: 'pdx.pm ' > Subject: Re: [Pdx-pm] Escaping a character in a string from a file > > >>>>> "John" == John writes: > > John> I have a file of regular expressions I want to match. I read in the > file > John> and then match each entry as such: > > John> if ($something =~ /$tomatch/i) > > John> I want to be able to specify something like ".pl" in the file so > that I can > John> match all perl files. Specifying .pl matches .apl. Is there a way > I can > John> escape the "." when it is in a file? I tried "\.pl", but it didn't > work. > > Uh, that should have, with the code you have above. Can you show > an example of it not working? > > -- > 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! > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From Michael.Rasmussen at columbiamanagement.com Wed May 12 15:30:16 2004 From: Michael.Rasmussen at columbiamanagement.com (Rasmussen, Michael) Date: Mon Aug 2 21:34:33 2004 Subject: FW: [Pdx-pm] Escaping a character in a string from a file Message-ID: <58A981FD421D5544AF2010325945492802CF809D@ntmail13.bqr.quick-reilly-group.com> > From: John [mailto:jgoalby@hotmail.com] > I have a file of regular expressions I want to match. I read in the file > and then match each entry as such: > if ($something =~ /$tomatch/i) > I want to be able to specify something like ".pl" in the file so that I can > match all perl files. Specifying .pl matches .apl. Is there a way I can > escape the "." when it is in a file? I tried "\.pl", but it didn't work. It doesn't? [mrasmuss@cmclink tback]$ ls a.apl a.pl b.bpl b.pl tpl [mrasmuss@cmclink tback]$ cat tpl #!/usr/bin/perl @file = `ls`; @pats = qw { pl .pl \.pl }; foreach $something (@file) { chomp $something; foreach $pat (@pats) { if ($something =~ /$pat/i) { print "did "; } else { print "did not "; } print "find $pat in $something\n"; } } [mrasmuss@cmclink tback]$./tpl did find pl in a.apl did find .pl in a.apl did not find \.pl in a.apl did find pl in a.pl did find .pl in a.pl did find \.pl in a.pl did find pl in b.bpl did find .pl in b.bpl did not find \.pl in b.bpl did find pl in b.pl did find .pl in b.pl did find \.pl in b.pl did find pl in tpl did find .pl in tpl did not find \.pl in tpl [mrasmuss@cmclink tback]$ -- Michael Rasmussen, Infrastructure Engineer Columbia Management Company, Portland, Oregon Michael.Rasmussen@ColumbiaManagement.com Desk: 971-925-6723 Desk: 503-973-6723 (deprecated) Cell: 503-209-6227 Mailstop: ORFM75901B (Until June 1) Mailstop: OR1-523-01-01 (Preferred) -------------- next part -------------- "WorldSecure " made the following annotations on 05/12/2004 04:24:27 PM ------------------------------------------------------------------------------ NOTICE: This communication may contain confidential or other privileged information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information. Also, please indicate to the sender that you have received this email in error, and delete the copy you received. Any communication that does not relate to official Columbia Management Group business is that of the sender and is neither given nor endorsed. Thank you. ============================================================================== From jgoalby at hotmail.com Wed May 12 15:32:53 2004 From: jgoalby at hotmail.com (John) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Escaping a character in a string from a file In-Reply-To: Message-ID: Sorry for not verifying this before. Generally I am good at doing that before posting (hangs head in shame). I was creating HTML output. Turns out when I was showing the results in the HTML the \ caused problems due to some javascript. When I tried to recreate with print statements it worked just fine. Sorry again! John. > -----Original Message----- > From: pdx-pm-list-bounces@mail.pm.org [mailto:pdx-pm-list- > bounces@mail.pm.org] On Behalf Of John > Sent: Wednesday, May 12, 2004 1:28 PM > To: 'pdx.pm ' > Subject: RE: [Pdx-pm] Escaping a character in a string from a file > > Oh! I tried to recreate the problem in a simpler example and it worked. > Obviously some side effect of something else I am doing. I will post my > stupidity as soon as I find it. > > John. > > > -----Original Message----- > > From: pdx-pm-list-bounces@mail.pm.org [mailto:pdx-pm-list- > > bounces@mail.pm.org] On Behalf Of Randal L. Schwartz > > Sent: Wednesday, May 12, 2004 1:21 PM > > To: John > > Cc: 'pdx.pm ' > > Subject: Re: [Pdx-pm] Escaping a character in a string from a file > > > > >>>>> "John" == John writes: > > > > John> I have a file of regular expressions I want to match. I read in > the > > file > > John> and then match each entry as such: > > > > John> if ($something =~ /$tomatch/i) > > > > John> I want to be able to specify something like ".pl" in the file so > > that I can > > John> match all perl files. Specifying .pl matches .apl. Is there a > way > > I can > > John> escape the "." when it is in a file? I tried "\.pl", but it > didn't > > work. > > > > Uh, that should have, with the code you have above. Can you show > > an example of it not working? > > > > -- > > 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! > > _______________________________________________ > > Pdx-pm-list mailing list > > Pdx-pm-list@mail.pm.org > > http://mail.pm.org/mailman/listinfo/pdx-pm-list > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From joe at radiojoe.org Wed May 12 20:39:25 2004 From: joe at radiojoe.org (Joe Oppegaard) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting tonight In-Reply-To: <50117.130.94.162.208.1084380421.squirrel@www.joshheumann.com> References: <50117.130.94.162.208.1084380421.squirrel@www.joshheumann.com> Message-ID: Some personal things came up tonight, so I'm not going to be able to make it. Sorry for such late notice, hopefully someone at the meeting is checking their e-mail. I'll get stuff posted I was going to talk about on the kwiki tomorrow. -Joe Oppegaard On Wed, 12 May 2004 at 10:47am -0600, Josh Heumann wrote: > May Meeting > > When: May 12th, 2004 6:30pm (To-nite!) > > Where: Free Geek, 1741 SE 10th Ave > > Who: A whole bunch of people, talking about the little things in life > > o JoeOppegaard > o John Labovitz > o Randal Schwartz > o Maybe Joshua Keroes > o Anyone else who wants to > > If the meeting is short, we can always adjourn to the Lucky Lab early and > make it a social meeting. > > Perl est gud. > > Josh > __________________________ > http://www.joshheumann.com > > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > From jkeroes at eli.net Wed May 12 20:50:44 2004 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting tonight In-Reply-To: References: Message-ID: Ditto - I'm at a 4 year old's birthday party now, just hootin' and hollerin' it up. This kid really knows how to party! J On May 12, 2004, at 6:39 PM, Joe Oppegaard wrote: > Some personal things came up tonight, so I'm not going to be able to > make it. Sorry for such late notice, hopefully someone at the meeting > is checking their e-mail. > > I'll get stuff posted I was going to talk about on the kwiki tomorrow. > > -Joe Oppegaard > > On Wed, 12 May 2004 at 10:47am -0600, Josh Heumann wrote: > >> May Meeting >> >> When: May 12th, 2004 6:30pm (To-nite!) >> >> Where: Free Geek, 1741 SE 10th Ave >> >> Who: A whole bunch of people, talking about the little things in life >> >> o JoeOppegaard >> o John Labovitz >> o Randal Schwartz >> o Maybe Joshua Keroes >> o Anyone else who wants to >> >> If the meeting is short, we can always adjourn to the Lucky Lab early >> and >> make it a social meeting. >> >> Perl est gud. >> >> Josh >> __________________________ >> http://www.joshheumann.com >> >> >> _______________________________________________ >> Pdx-pm-list mailing list >> Pdx-pm-list@mail.pm.org >> http://mail.pm.org/mailman/listinfo/pdx-pm-list >> > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > -------------- next part -------------- A non-text attachment was scrubbed... Name: Joshua Keroes.vcf Type: text/directory Size: 363 bytes Desc: not available Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20040512/634f4ca0/JoshuaKeroes.bin -------------- next part -------------- From merlyn at stonehenge.com Wed May 12 20:59:20 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] May Meeting tonight In-Reply-To: References: Message-ID: <861xlp2ikp.fsf@blue.stonehenge.com> >>>>> "Joshua" == Joshua Keroes writes: Joshua> Ditto - I'm at a 4 year old's birthday party now, just hootin' and Joshua> hollerin' it up. This kid really knows how to party! It's a small meeting so far. just the five of us. -- 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 ajsavige at yahoo.com.au Wed May 12 21:55:53 2004 From: ajsavige at yahoo.com.au (=?iso-8859-1?q?Andrew=20Savige?=) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Escaping a character in a string from a file In-Reply-To: Message-ID: <20040513025553.23938.qmail@web50510.mail.yahoo.com> John wrote: > I have a file of regular expressions I want to match. I read in the file > and then match each entry as such: > > if ($something =~ /$tomatch/i) > > I want to be able to specify something like ".pl" in the file so that I can > match all perl files. Specifying .pl matches .apl. Is there a way I can > escape the "." when it is in a file? I tried "\.pl", but it didn't work. To ensure you don't match "fred.please", use '\.pl$' -- or '\.plx?$' to match files ending in either ".pl" or ".plx". /-\ Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com From wcooley at nakedape.cc Thu May 13 12:38:31 2004 From: wcooley at nakedape.cc (Wil Cooley) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Package Parameters? Message-ID: <1084469910.7857.3.camel@denk.nakedape.priv> Can someone direct me to the right docs that explain how to make packages take parameters? I've looked over everything I've got and can't find anything about it. Maybe I'm using the wrong terms; what I'm talking about is something like this from the client side: use Class::MakeMethods::Standard::Hash ( 'scalar' => 'foo' ); Wil -- Wil Cooley mailto:wcooley@nakedape.cc Naked Ape Consulting http://nakedape.cc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20040513/fe70c14e/attachment.bin From jkeroes at eli.net Thu May 13 12:43:47 2004 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] Package Parameters? In-Reply-To: <1084469910.7857.3.camel@denk.nakedape.priv> References: <1084469910.7857.3.camel@denk.nakedape.priv> Message-ID: <16255833-A505-11D8-AFDF-000A95C466EC@eli.net> On May 13, 2004, at 10:38 AM, Wil Cooley wrote: > Can someone direct me to the right docs that explain how to make > packages take parameters? I've looked over everything I've got and > can't find anything about it. Maybe I'm using the wrong terms; what > I'm > talking about is something like this from the client side: > > use Class::MakeMethods::Standard::Hash ( > 'scalar' => 'foo' > ); > import() is the key. See the Package::Alias source for one example. -J From tex at off.org Fri May 14 15:33:25 2004 From: tex at off.org (Austin Schutz) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] modperl irritations Message-ID: <20040514203325.GA15876@gblx.net> We run modperl to make our website run fast instead of crawl. Unfortunately, occasionally modperl will seem to cache some of the data, hosing the data on the site. As a workaround we've been restarting the webserver every few hours, and I've tried doing things like initializing lexicals before using them, but nothing seems to help in a meaningful permanent way. What's really irritating is that it is generally unreproduceable and if you think you have an idea of how to work around it, you can't tell for several more hours... Does anyone have a tried and true method for dealing with this? Danke, Austin From tcaine at eli.net Fri May 14 16:06:50 2004 From: tcaine at eli.net (Todd Caine) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] modperl irritations In-Reply-To: <20040514203325.GA15876@gblx.net> References: <20040514203325.GA15876@gblx.net> Message-ID: <20040514210650.GF7965@eli.net> Apache::StatINC might be useful. Are you using Apache::Registry so that you can run unaltered CGI scripts under Apache? All I can think of is check your global variables because they will be persistent. http://perl.apache.org/docs/1.0/guide/porting.html#Sometimes_it_Works__Sometimes_it_Doesn_t I prefer to deal with these types of problems by writing the CGI using CGI::Application to begin with; I realize this may not be an option now. It make life really easy when changing from mod_cgi to mod_perl. My $0.02, Todd On (Fri, May 14 13:33), Austin Schutz wrote: > > We run modperl to make our website run fast instead of crawl. > Unfortunately, occasionally modperl will seem to cache some of the data, > hosing the data on the site. > As a workaround we've been restarting the webserver every few > hours, and I've tried doing things like initializing lexicals before using > them, but nothing seems to help in a meaningful permanent way. What's really > irritating is that it is generally unreproduceable and if you think you have > an idea of how to work around it, you can't tell for several more hours... > > Does anyone have a tried and true method for dealing with this? > > Danke, > > Austin > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From techdude at dpo.org Fri May 14 20:01:12 2004 From: techdude at dpo.org (John Springer) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] MIME::Lite headaches Message-ID: <5BDE34F2-A60B-11D8-B8BE-000A95778B6E@dpo.org> I could sure use some help with MIME::Lite. I'm trying to send an email that consists of an HTML part and an alternative text/plain part, and I want to have images for the HTML part embedded in the email. It kinda sorta works, but not quite. Problem 1. I can't seem to get a valid reference for the images in the HTML page. I'm using src="cid:image_id" but it's clearly not finding the image to display. I notice that MIME::Lite is putting this in the header for the graphic: Content-Id: image_id I think it's supposed to be Content-ID: image_id, but I'm not sure how to change the case of that tag, and I'm not sure that's the problem anyway. Problem 2. The other thing I can't figure out is when I send a multipart/alternative with text and html, I';m only seeing the plain text version on my mail reader. I see HTML mails all the time. Is there some way to indicate a precedence or something? I've sent myself about 100 messages today with all the tweaks I can think of. Anyone have any suggestions as to how to debug this or what to look for? My message structure looks like this: type: multipart/related; boundary=A --A type: multipart/alternative; boundary=B --B type text/html --B type text/plain --B --A type image/gif --A type image/gif --A -- John Springer Tech Dude Democratic Party of Oregon -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1443 bytes Desc: not available Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20040514/37de61e4/attachment.bin From mikeraz at patch.com Sun May 16 00:21:24 2004 From: mikeraz at patch.com (Michael Rasmussen) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] file processing - from to delimiters Message-ID: <20040516052124.GA1307@patch.com> I have this memory that there's some perl construct of the form KEYWORD ( RE1 .. RE2 ) { code; } where (for instance) reading a file the code will only be executed after RE1 has been encountered and before RE2 has been encountered. for instance KEYWORD ( //i .. /<\/head>/i ) { process headers for web page; } Am I remembering a dream or is this a feature of the language? If it is a feature, what is the keyword? It's not something I'm finding in `man perlsyn` or `man perlfunc` -- Michael Rasmussen, Portland Oregon Be appropriate && Follow your curiosity http://meme.patch.com/memes/BicycleRiding Get Fixed: http://www.dampfixie.org The fortune cookie says: Everyone hates me because I'm paranoid. From tkil at scrye.com Sun May 16 00:49:47 2004 From: tkil at scrye.com (Tkil) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] file processing - from to delimiters In-Reply-To: <20040516052124.GA1307@patch.com> (Michael Rasmussen's message of "Sat, 15 May 2004 22:21:24 -0700") References: <20040516052124.GA1307@patch.com> Message-ID: >>>>> "MR" == Michael Rasmussen writes: MR> I have this memory that there's some perl construct of the form MR> KEYWORD ( RE1 .. RE2 ) { MR> code; MR> } MR> where (for instance) reading a file the code will only be executed MR> after RE1 has been encountered and before RE2 has been MR> encountered. for instance MR> KEYWORD ( //i .. /<\/head>/i ) { MR> process headers for web page; MR> } MR> Am I remembering a dream or is this a feature of the language? If MR> it is a feature, what is the keyword? MR> It's not something I'm finding in `man perlsyn` or `man perlfunc` It's the range operator ".." (thus in perlop) and it simply evaluates to true or false. so: while (<>) { if ( /start/ .. /end/ ) { print "in range\n"; } } There is also "...", which is very closely related. There are some special cases to both of them. HTH, t. From mikeraz at patch.com Sun May 16 00:53:43 2004 From: mikeraz at patch.com (Michael Rasmussen) Date: Mon Aug 2 21:34:33 2004 Subject: [Pdx-pm] file processing - from to delimiters - solution In-Reply-To: References: <20040516052124.GA1307@patch.com> Message-ID: <20040516055343.GA2696@patch.com> On Sat, May 15, 2004 at 11:49:47PM -0600, Tkil wrote: > MR> I have this memory that there's some perl construct of the form > > MR> KEYWORD ( RE1 .. RE2 ) { > MR> code; > MR> } > > MR> Am I remembering a dream or is this a feature of the language? If > MR> it is a feature, what is the keyword? > > It's the range operator ".." (thus in perlop) and it simply evaluates > to true or false. so: Yes, that is exactly what I couldn't remember. Thank you. -- Michael Rasmussen, Portland Oregon Be appropriate && Follow your curiosity http://meme.patch.com/memes/BicycleRiding Get Fixed: http://www.dampfixie.org The fortune cookie says: Professor Gorden Newell threw another shutout in last week's Chem Eng. 130 midterm. Once again a student did not receive a single point on his exam. Newell has now tossed 5 shutouts this quarter. Newell's earned exam average has now dropped to a phenomenal 30%. From will at williamschmidt.com Sun May 16 13:55:58 2004 From: will at williamschmidt.com (T. William Schmidt) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Perl DBI DSN string specification Message-ID: <5.2.0.9.2.20040516110902.0302dd80@mail.williamschmidt.com> Hello All, especially DBI DBD::ODBC and Win32::ODBC experts, I am writing an application for a client that accesses data in Microsoft SQLServers. Currently I have parallel developments underway using both DBD::ODBC and Win32::ODBC on ActiveState Perl, v5.8.3 build 809. The target platforms for the client application are W2K and XP. The application accesses multiple SQLServers concurrently and will be installed on many desktop PCs. This makes ease of installation and admin very important. I can easily create DSN definitions using the ODBC Data Source Administrator in the Control Panel. My applet based definitions all work so the problem is not being able to access those servers. I prefer instead to use the DSN string specification. Using the applet is very easy for someone installing from the keyboard but a pain in the petootie for remote installs on Windows. Windows of course, hides the DSN attributes in multiple keys in the registry. Problem is, there is a dearth of documentation on specifying the DSN string. Most writers on DBI discuss the Control Panel applet, because it is so easy and the string method is relatively obscure. Cases in point: Here is one way to make a connection to an SQLServer using the external DSN definition: use DBI; my $DSN = 'clesql01'; # logical name given to a data source in applet my $dbh = DBI->connect("dbi:ODBC:$DSN", 'username', 'userpw', { RaiseError => 1, AutoCommit => 1 }) or die "$DBI::errstr\n"; or, use Win32::ODBC; my $db = new Win32::ODBC("DSN=clesql01;UID=username;PWD=userpw") or die Win32::ODBC::Error(); Both of these work just fine but what I prefer to write is something like: use DBI; my $DSN = 'driver={SQL Server};Server=node.domain.com;database=my_database;uid=username; pwd=userpw;'; my $dbh = DBI->connect("dbi:ODBC:$DSN", 'username', 'userpw', { RaiseError => 1, AutoCommit => 1 }) or die "$DBI::errstr\n"; or, in Win32::; use Win32::ODBC; my $DSN = 'driver={SQL Server};Server=node.domain.com;database=my_database;uid=username; pwd=userpw;'; my $db = new Win32::ODBC("$DSN") or die Win32::ODBC::Error(); I found the following example in the ActiveState documentation, and is the basis for those code fragments above. The problem is, it does not work. I am assuming the example is correct but insufficient, and is missing mandatory attributes that the MS ODBC driver requires; for example the server port number and the network protocol. I have been hacking different key=value pairs trying to guess what the driver requires, but so far all have failed. The error messages from the driver are not much help. They state the obvious, client failure to connect. Does anyone know exactly how to specify a DSN string for SQLServer? Thanks in advance for at least reading this post, and any help will be much appreciated. ======= From ActiveState Perl documentation ========== Example (using MSSQL Server): my $DSN = 'driver={SQL Server};Server=server_name; database=database_name;uid=user;pwd=password;'; my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n"; Regards, Will Schmidt WilliamSchmidt.com, LLC 11201 NW 77th Street Terrebonne, OR 97760 541 504-0290 will@williamschmidt.com http://www.williamschmidt.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20040516/4537c7bd/attachment.htm From raanders at acm.org Mon May 17 13:20:19 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] PerlScript Execution Message-ID: This is a strange one (or at least to me). And probably not quite on topic but if anyone can point me towards the correct information or at least the correct terms to do some more searching I would appreaciate it. I've been given some ASP pages/scripts that use PerlScript for the coding but every time I try to run them I get the old familiar MS Windows 'it's broke message' with no useful information as to the real issue. I am running several perl based CGIs on the same system and have no problem and can make the ASP scripts 'not error' if I remove the <%@ language="PerlScript" %> <% ... %> constructs/wrappers and rename the file with a .plx instead of .asp extension. All searching using Google returns how to write CGIs (which I'm doing just fine) though one search result indicated IIS should be stopped before installing perl (ActiveState/ActivePerl). We're using the free version so I figure that could be a problem. Any suggestions? (I did check the definitive scripts source - http://www.stonehenge.com/merlyn/ :-) Rod -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" From raanders at acm.org Mon May 17 15:54:34 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] PerlScript Execution In-Reply-To: Message-ID: I hate it when I have to reply to my own messages. I found the problem. There is an error in one of the modules and since IIS doesn't report the exact line I figure it was an ASP problem. (IIS just globs all the lines together and says there's an error.) After I got clueful I tried running the script adding one line at a time. Bingo! Sorry for the bogus bandwidth usage. Rod -- On Mon, 17 May 2004, Roderick A. Anderson wrote: > This is a strange one (or at least to me). And probably not quite on > topic but if anyone can point me towards the correct information or at > least the correct terms to do some more searching I would appreaciate it. > > I've been given some ASP pages/scripts that use PerlScript for the coding > but every time I try to run them I get the old familiar MS Windows 'it's > broke message' with no useful information as to the real issue. > > I am running several perl based CGIs on the same system and have no > problem and can make the ASP scripts 'not error' if I remove the > > <%@ language="PerlScript" %> > <% > > ... > > %> > > constructs/wrappers and rename the file with a .plx instead of .asp > extension. > > All searching using Google returns how to write CGIs (which I'm doing just > fine) though one search result indicated IIS should be stopped before > installing perl (ActiveState/ActivePerl). We're using the free version so > I figure that could be a problem. > > Any suggestions? (I did check the definitive scripts source - > http://www.stonehenge.com/merlyn/ :-) > > > Rod > -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" From kellert at ohsu.edu Wed May 19 16:01:22 2004 From: kellert at ohsu.edu (Thomas J Keller) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] command line options Message-ID: Hi all, Simple question, but I can't find the answer. I want to do the simplest thing: read a tab delimited file with Mac ('\cM' carriage return) endings, and remove extra whitespace. I wrote this on the command line: perl -i.bak -pe 'local $/ = "\cM'; s/[\s\t]+/\t/g;' input.txt It removes the extra whitespace, but doesn't keep the line endings, i.e. output is a single line. I also tried the -0 option with "\cM", but that gave an error. Please help. Thanks, Tom K. From merlyn at stonehenge.com Wed May 19 16:27:31 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] command line options In-Reply-To: References: Message-ID: <86pt906rb3.fsf@blue.stonehenge.com> >>>>> "Thomas" == Thomas J Keller writes: Thomas> Simple question, but I can't find the answer. Thomas> I want to do the simplest thing: read a tab delimited file with Mac Thomas> ('\cM' carriage return) endings, and remove extra whitespace. Thomas> I wrote this on the command line: Thomas> perl -i.bak -pe 'local $/ = "\cM'; s/[\s\t]+/\t/g;' input.txt Thomas> It removes the extra whitespace, but doesn't keep the line endings, Thomas> i.e. output is a single line. Thomas> I also tried the -0 option with "\cM", but that gave an error. Untested: perl -015 -i.bak -pe 's/\s+/\t/g' input.txt -- 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 bruce at gridpoint.com Wed May 19 16:44:48 2004 From: bruce at gridpoint.com (Bruce J Keeler) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] command line options In-Reply-To: References: Message-ID: <1085003088.10355.30.camel@bjk-machine> On Wed, 2004-05-19 at 14:01, Thomas J Keller wrote: > Hi all, > Simple question, but I can't find the answer. > I want to do the simplest thing: read a tab delimited file with Mac > ('\cM' carriage return) endings, and remove extra whitespace. > > I wrote this on the command line: > perl -i.bak -pe 'local $/ = "\cM'; s/[\s\t]+/\t/g;' input.txt This is equivalent to: while (<>) { local $/ = "\cM"; s/[\s\t]+/\t/g; print; } The 'local $/ = "\cM"' statement is in the wrong place to influence the behavior of the '<>', so the whole file is being read in at once, and the regex only runs once. That's problem #1. Problem #2 is that \s matches the carriage-returns, so they're getting eaten and replaced with tabs. Bruce From kellert at ohsu.edu Wed May 19 17:19:46 2004 From: kellert at ohsu.edu (Thomas J Keller) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] command line options In-Reply-To: References: Message-ID: Thanks Randal, Colin, and Bruce. Weird, but (apparently) with \cM as a line-ending you have to specify both in ($/) w/ -015 and out ($\) w/ -l If not it either reads in as a single line, or outputs as a single line. This worked: perl -i.bak -015 -l -pe 's/\s+/\t/g' input.txt Thanks again, Tom K On May 19, 2004, at 2:01 PM, Thomas J Keller wrote: > Hi all, > Simple question, but I can't find the answer. > I want to do the simplest thing: read a tab delimited file with Mac > ('\cM' carriage return) endings, and remove extra whitespace. > > I wrote this on the command line: > perl -i.bak -pe 'local $/ = "\cM'; s/[\s\t]+/\t/g;' input.txt > > It removes the extra whitespace, but doesn't keep the line endings, > i.e. output is a single line. > > I also tried the -0 option with "\cM", but that gave an error. > > Please help. > Thanks, > Tom K. > > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From raanders at acm.org Fri May 21 12:11:48 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] AutoDia errors Message-ID: I've run into a problem after installing AutoDia. When I run it using various incantations I get the following errors. My weak-ass attempts at debugging have got me nowhere. Any help suggestions? [raanders@main raanders]$ autodia.pl -i /usr/bin/autodia.pl getting pattern for perl Use of uninitialized value in pattern match (m//) at /usr/bin/autodia.pl line 113. AutoDia - version 1.99(c) Copyright 2003 A Trevena getting handlers.. using language : perl ..using Autodia::Handler::Perl opening /usr/bin/autodia.pl Can't call method "Name" on an undefined value at /usr/lib/perl5/site_perl/5.6.0/Autodia/Handler/Perl.pm line 195, line 316. [raanders@main raanders]$ TIA, Rod -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" From raanders at acm.org Fri May 28 11:29:19 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Convert code to a module Message-ID: I'd like some suggestions on what is the best reading on how to convert my existing code to a modules. It has lots of subroutines that are fairly well abstracted/generalized but I'd like to get them out of the main file and usable by my other applications. (How may times do I need to copy and paste a debugging/logging (sub)routine?) So I figure I could/should move them into a module. I have what I think are the definitive books on OOPerl: Advanced Perl Programming Effective Perl Programming: Writing Better Programs Learning Perl Objects, References & Modules Perl Cookbook, 2nd Edition of course Programming Perl, 3rd Edition (and a couple of others I can't think of off the top of my head) but that is a lot to (re)search through and (re)digest. I seem to remember some articles on moving from monolith coding to modules but can't place my brain on them now. Any suggestions? Thanks, Rod -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" "My middleware is perl, sorry if yours isn't" From jgoalby at hotmail.com Fri May 28 13:23:25 2004 From: jgoalby at hotmail.com (John) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Tk::Tree In-Reply-To: Message-ID: Hi, I am new to Tk, so please excuse my newbie questions ;-) Does anyone know if it is possible to display balloon help for an item in a Tk::Tree? Do I need a widget to attach the balloon to? If so, does anyone have an example of how to do this with the tree? Alternatively, is there a way to show a balloon until the user moves the mouse? That might enable me to wait for some type of hover event (not sure if I can do this yet) and then show the balloon until the user moves the mouse. TIA, John. From kellert at ohsu.edu Fri May 28 16:02:40 2004 From: kellert at ohsu.edu (Thomas J Keller) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Mail::Lite, Net::SMTP problem Message-ID: <5ADEDFD8-B0EA-11D8-B278-0003930405E2@ohsu.edu> Greetings, It's my understanding that Mail::Lite calls Net::SMTP under the hood when you call the send() method: $msg->send("smtp", "$smtp_host", SkipBad=>1, Notify=>'Never', ); It gets its list of email addresses, from the MIMI::Lite msg object, but some of them are not valid (out of my control). When I run this script I get SMTP RCPT command failed: No such recipient at core_fees_mail.pl line 48 And NO mail gets sent. I'd like to force Net::SMTP to send out the good ones and just give a warning about the bad ones. That's what I thought I was doing with the SkipBad and Notify options. But alas, doesn't seem to work that way. Your suggestions will be appreciated. Thanks, Tom K From nick2canz at yahoo.com Fri May 28 16:04:00 2004 From: nick2canz at yahoo.com (Nick Wehr) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] AutoDia Message-ID: <20040528210400.92971.qmail@web50902.mail.yahoo.com> This last post made me wonder... how many of you out there use autodia? I've used dia to flowchart my programs... but all by hand. Is the autodia so good that I should ditch doing it by hand? I tried to build it on my system, but after the first failure I didn't have the time to go back and finish... should I bother? thanks, Nick Wehr __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ From dpool at hevanet.com Sat May 29 12:45:41 2004 From: dpool at hevanet.com (David Pool) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Wallstreet Jesus at Perlmongers? Message-ID: <40B8CC45.9060905@hevanet.com> Hm, spotted this article on News4Neighbors saying that the Wallstreet Jesus had been spotted at some local perlmonger meetings. Anyone else spotted this dude? http://www.news4neighbors.net/article.pl?sid=04/05/29/1749228 :-D From jkeroes at eli.net Sat May 29 16:18:32 2004 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Convert code to a module In-Reply-To: References: Message-ID: On May 28, 2004, at 9:29 AM, Roderick A. Anderson wrote: > I'd like some suggestions on what is the best reading on how to > convert my > existing code to a modules. Don't forget to read the the [free] manpages on the subject: http://perldoc.com/perl5.8.4/pod/perlboot.html http://perldoc.com/perl5.8.4/pod/perltoot.html http://perldoc.com/perl5.8.4/pod/perltooc.html The book that helped me more than any other was Damian Conway's Object Oriented Perl: http://www.manning.com/conway/ From ajsavige at yahoo.com.au Sun May 30 08:16:06 2004 From: ajsavige at yahoo.com.au (=?iso-8859-1?q?Andrew=20Savige?=) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Convert code to a module In-Reply-To: Message-ID: <20040530131606.4794.qmail@web50506.mail.yahoo.com> "Roderick A. Anderson" wrote: > I have what I think are the definitive books on OOPerl: > Advanced Perl Programming > Effective Perl Programming: Writing Better Programs > Learning Perl Objects, References & Modules > Perl Cookbook, 2nd Edition > of course > Programming Perl, 3rd Edition All the above books are excellent, though Advanced Perl Programming (1997) is rather old now; I heard Simon Cozens is working on its second edition but don't know when it is due for publication. As already pointed out, the obvious omission from the above list is Damian Conway's advanced classic "Object Oriented Perl". http://books.perl.org seems to be down (I hope not permanently, since this site's creator (Spoon) tragically passed away last December). /-\ Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com From raanders at acm.org Sun May 30 13:40:43 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Convert code to a module In-Reply-To: <20040530131606.4794.qmail@web50506.mail.yahoo.com> Message-ID: On Sun, 30 May 2004, Andrew Savige wrote: > All the above books are excellent, though Advanced Perl Programming > (1997) is rather old now; I heard Simon Cozens is working on its > second edition but don't know when it is due for publication. > As already pointed out, the obvious omission from the above list > is Damian Conway's advanced classic "Object Oriented Perl". Just missed mentioning it. Sits on my book shelf (at home) behind me. I've had it down and read significant portions since I got it several years ago but my lack of regular perl coding for a goodly portion of that time is biting me now. Looks like it's time to get it down gain. When I made the list for the origianl message I was sitting at work and looking on Safari trying to remember which books I had and how much of them I'd read. Looking behind me I see several more. Time to get back reading again. Rod -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" From raanders at acm.org Sun May 30 13:45:21 2004 From: raanders at acm.org (Roderick A. Anderson) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Convert code to a module In-Reply-To: Message-ID: On Sat, 29 May 2004, Joshua Keroes wrote: > Don't forget to read the the [free] manpages on the subject: > > http://perldoc.com/perl5.8.4/pod/perlboot.html > http://perldoc.com/perl5.8.4/pod/perltoot.html > http://perldoc.com/perl5.8.4/pod/perltooc.html Damn I keep forgetting (or misplacing) the URL's for these. > The book that helped me more than any other was Damian Conway's Object > Oriented Perl: Yes (as I said in another message) this is on my shelf. I remember wehn I first read it (or most of it) how cranked up I got to go modular! Then a lack of coding time and need sent that knowledge to the back of my mind. Rod -- "Open Source Software - You usually get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" From curtis_ovid_poe at yahoo.com Mon May 31 11:29:02 2004 From: curtis_ovid_poe at yahoo.com (Ovid) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Mailing List Etiquette Message-ID: <20040531162902.95683.qmail@web60809.mail.yahoo.com> Hi all, Just a quick reminder: when you set your "out of office" reply on your email client, please be sure to *exclude* mailing lists. Spam is never fun, regardless of whether or not it was intentional. Since I administer the email list, there's been some discussion of whether or not I should automatically unsubscribe people who forget to do this. I've not done this because we're such low-traffic, but I people might want to know about this. Cheers, Curtis ===== Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ From curtis_ovid_poe at yahoo.com Mon May 31 11:29:27 2004 From: curtis_ovid_poe at yahoo.com (Ovid) Date: Mon Aug 2 21:34:34 2004 Subject: [Pdx-pm] Mailing List Etiquette Message-ID: <20040531162927.86027.qmail@web60808.mail.yahoo.com> Hi all, Just a quick reminder: when you set your "out of office" reply on your email client, please be sure to *exclude* mailing lists. Spam is never fun, regardless of whether or not it was intentional. Since I administer the email list, there's been some discussion of whether or not I should automatically unsubscribe people who forget to do this. I've not done this because we're such low-traffic, but I people might want to know about this. Cheers, Curtis ===== Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/