From rbowen at rcbowen.com Wed Feb 2 08:43:06 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Job Posting Message-ID: <3898427A.2336B5F2@rcbowen.com> FYI -------- Original Message -------- Subject: experienced perl programmer needed Date: Wed, 2 Feb 2000 08:35:40 -0600 From: "Shannon Shepherd" To: My company is growing very rapidly and is in desperate need of an experienced perl programmer - also sql and BSDI. We are located near Mobile, AL. We are offering $10k-13k/mo, benefits, stock options and moving expenses. If it is in your policy to post jobs on your list, I would appreciate it if you would. If not, where do you suggest that I post this job? Thanks for your help! Shannon Shepherd Software Development & Support Virtual City Vision, Inc. From llang at baywestpaper.com Fri Feb 4 15:08:16 2000 From: llang at baywestpaper.com (llang@baywestpaper.com) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Q: End a process/program under NT? Message-ID: Having only (thus far) used Perl for general text wrangling and input mutilation, and not being able to dig in and use it on a daily basis to learn the proverbial finer points of it, I now find myself faced with the following: We have a process that runs in the system tray under NT. I'd like to be able to shut it down, but do so kindly. In essence, I want to send it the equivalent of an ALT-F4 (I guess that'd be an exit signal??) Doing that will make it shut down all of it's internal comm threads in the proper way and such niceties. Can someone push me in the direction of the right module to look at (Win32::{OLE || Process || other}) and a general run-down of how-to? (Bear in mind that I've never had cause to do process manipulation/management before and that I'm a reluctant NT newbie.) :-) Loren From rbowen at rcbowen.com Fri Feb 4 15:23:52 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Q: End a process/program under NT? References: Message-ID: <389B4368.4DF384F@rcbowen.com> llang@baywestpaper.com wrote: > > Having only (thus far) used Perl for general text wrangling and input > mutilation, and not being able to dig in and use it on a daily basis to > learn the proverbial finer points of it, I now find myself faced with the > following: > > We have a process that runs in the system tray under NT. I'd like to be > able to shut it down, but do so kindly. In essence, I want to send it the > equivalent of an ALT-F4 (I guess that'd be an exit signal??) Doing that > will make it shut down all of it's internal comm threads in the proper way > and such niceties. Can someone push me in the direction of the right > module to look at (Win32::{OLE || Process || other}) and a general run-down > of how-to? (Bear in mind that I've never had cause to do process > manipulation/management before and that I'm a reluctant NT newbie.) :-) Although the docs are less than wonderful, Win32::Process looks like it might be the way to go. You can do a Win32::Process::KillProcess($pid, $exitcode) to kill a process, if you know the PID. It also appears that you can use Win32::PerfLib to get the process ID, given the name. Or at least get a list of processes, from which you can select the one that you're interested in. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From fireston at lexmark.com Fri Feb 4 16:00:37 2000 From: fireston at lexmark.com (Mik Firestone) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Book recommendations Message-ID: <200002042200.RAA24190@interlock2.lexmark.com> I have recently become the proud owner of a copy of Dennis Conway's "Object Oriented Perl". For those of you who do not get the Perl Journal, this book is a new offering that was very highly recommended in the latest issue. Having read only a third of it, I would add my voice to the recommendations. Even if you don't use the Object Oriented parts of Perl, there are greats bits of wisdom scattered throughout the text that make it worth the purchase price. For example, this book explains closures in about 2 pages in a way that makes it very clear what they are. This is a task I would have thought impossible ( closures being some of the darkest Perl voodoo ). Conway then explains globs in an equally clear fashion. Conway also does some very interesting OO stuff - like how to make true private variables in Perl, how to bless scalars, overloading, inheritance, etc. The book targets a broad spectrum of coders - from the beginner to the guru and hits the target very well. The explanations are clear and concise with very little hand waving. But they are also just twisted enough to keep the experts interested ( why, oh why, would you want to bless a scalar? ). At the risk of being accused of plugging, the book's ISBN number is 1-884777-79-1 and is published by Manning. The company is online at www.manning.com. I ordered online on 1/31/00 and received it yesterday - the wait time isn't too long. -- Mik Firestone fireston@lexmark.com When I become an Evil Overlord: My troops will receive special training so that they may shoot the tires of a moving vehicle. From repett0 at sac.uky.edu Mon Feb 7 11:54:35 2000 From: repett0 at sac.uky.edu (repett0@sac.uky.edu) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: ACM/UKLUG meeting Message-ID: Both meetings are tomorrow(tuesday the 8th) ACM 4pm MMRB(Mining building across chem phys) room 102 UKLUG 7pm Young room I-62 ACM will be talking about Computer Engineering/Undergrad Research Group UKLUG will be talking about PHP/MYsql/apache installs for newbies I know I'm in lug but please go to both. The acm meeting will be important. NEITHER IS LIMITED TO CS MAJORS OR STUDENTS(LUG)... please come and get involved in the UK technical community. Ron ps. Please forward this to all tech people From fprice at mis.net Tue Feb 8 17:28:29 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Next meeting? Message-ID: Hi -- I've gotten a bit confused in the meeting shuffle: what date is our Feb meeting? Thanks, -Frank. ____ ____ Frank Price fprice@mis.net Linux: the choice of a GNU generation -|- Why not go mad? From rbowen at rcbowen.com Tue Feb 8 19:19:00 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Next meeting? References: Message-ID: <38A0C084.600EDE9F@rcbowen.com> Frank Price wrote: > > Hi -- I've gotten a bit confused in the meeting shuffle: what date is > our Feb meeting? Unless I'm also confused, it's as listed on the web site - February 21st, 6pm Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From lothos_25 at yahoo.com Wed Feb 9 09:33:59 2000 From: lothos_25 at yahoo.com (Carl Rose) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff Message-ID: <20000209153359.12812.qmail@web1104.mail.yahoo.com> OK, I just subscribed and test to see if this gets out where I want it. Second: I have a question concerning the incrementation of the day of the month. I am a newbie of sorts so I ask your forgiveness in advance for my lack of knowledge. But I am trying to learn and that is more than most are willing to do. To wit -- I have a script that needs to rotate date functions in 28 day intervals- I have the following code ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $mon += 1; $year = $year +1900; print "$mon/$mday/$year \n"; It of course returns the date just like I want it (02/09/2000). So what code do I issue to get 28 days from now added onto the day and get the correct rollaround. (ie when you add 28 above you get Feb 37th -ugg instead of the early part of March). Any help would be appreciated and go toward good karma. Regards, -C ===== "The only thing that saves us from the bureaucracy is its inefficiency." -Eugene McCarthy __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com From rbowen at rcbowen.com Wed Feb 9 09:45:15 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff References: <20000209153359.12812.qmail@web1104.mail.yahoo.com> Message-ID: <38A18B8B.F2F4836@rcbowen.com> Carl Rose wrote: > ... > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) > = localtime(time); > $mon += 1; > $year = $year +1900; > > print "$mon/$mday/$year \n"; > > It of course returns the date just like I want it > (02/09/2000). So what code do I issue to get 28 days > from now added onto the day and get the correct > rollaround. (ie when you add 28 above you get Feb 37th > -ugg instead of the early part of March). Any help > would be appreciated and go toward good karma. How about: $now = time; $later = $now + (28 * 24 * 60 * 60); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($later); $mon += 1; $year = $year +1900; print "$mon/$mday/$year \n"; Enjoy, and welcome to the list. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Wed Feb 9 09:45:15 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff References: <20000209153359.12812.qmail@web1104.mail.yahoo.com> Message-ID: <38A18B8B.F2F4836@rcbowen.com> Carl Rose wrote: > ... > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) > = localtime(time); > $mon += 1; > $year = $year +1900; > > print "$mon/$mday/$year \n"; > > It of course returns the date just like I want it > (02/09/2000). So what code do I issue to get 28 days > from now added onto the day and get the correct > rollaround. (ie when you add 28 above you get Feb 37th > -ugg instead of the early part of March). Any help > would be appreciated and go toward good karma. How about: $now = time; $later = $now + (28 * 24 * 60 * 60); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($later); $mon += 1; $year = $year +1900; print "$mon/$mday/$year \n"; Enjoy, and welcome to the list. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From mandrews at bit0.com Wed Feb 9 10:10:11 2000 From: mandrews at bit0.com (Mike Andrews) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff In-Reply-To: <20000209153359.12812.qmail@web1104.mail.yahoo.com> Message-ID: On Wed, 9 Feb 2000, Carl Rose wrote: > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) > = localtime(time); > $mon += 1; > $year = $year +1900; > > print "$mon/$mday/$year \n"; > > It of course returns the date just like I want it > (02/09/2000). So what code do I issue to get 28 days > from now added onto the day and get the correct > rollaround. (ie when you add 28 above you get Feb 37th I'd add 28 days worth of seconds to 'time' and have localtime just return that: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time+2419200); (60 secs * 60 mins * 24 hours = 86400 seconds, * 28 days = 2419200) Mike Andrews (MA12) * mandrews@dcr.net * http://www.bit0.com/ VP, sysadmin, & network guy, Digital Crescent Inc, Frankfort KY Internet services for Frankfort, Lawrenceburg, Owenton, Shelbyville "Don't sweat the petty things, and don't pet the sweaty things." From mandrews at bit0.com Wed Feb 9 10:10:11 2000 From: mandrews at bit0.com (Mike Andrews) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff In-Reply-To: <20000209153359.12812.qmail@web1104.mail.yahoo.com> Message-ID: On Wed, 9 Feb 2000, Carl Rose wrote: > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) > = localtime(time); > $mon += 1; > $year = $year +1900; > > print "$mon/$mday/$year \n"; > > It of course returns the date just like I want it > (02/09/2000). So what code do I issue to get 28 days > from now added onto the day and get the correct > rollaround. (ie when you add 28 above you get Feb 37th I'd add 28 days worth of seconds to 'time' and have localtime just return that: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time+2419200); (60 secs * 60 mins * 24 hours = 86400 seconds, * 28 days = 2419200) Mike Andrews (MA12) * mandrews@dcr.net * http://www.bit0.com/ VP, sysadmin, & network guy, Digital Crescent Inc, Frankfort KY Internet services for Frankfort, Lawrenceburg, Owenton, Shelbyville "Don't sweat the petty things, and don't pet the sweaty things." From hempy at ket.org Wed Feb 9 13:18:09 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff In-Reply-To: <20000209153359.12812.qmail@web1104.mail.yahoo.com> Message-ID: <4.1.20000209141231.03c6c100@mail.ket.org> At 07:33 AM 2/9/2000 -0800, you wrote: >It of course returns the date just like I want it >(02/09/2000). So what code do I issue to get 28 days >from now added onto the day and get the correct >rollaround. (ie when you add 28 above you get Feb 37th >-ugg instead of the early part of March). Any help >would be appreciated and go toward good karma. > time is expressed in seconds since the epoch. You can adjust a time (which is actually date and time) by adding/subtracting seconds. There are 86400 seconds in a day (60*60*24). This code will increment a time by 28 days: $mytime = time(); $mytime += 28 * 86400; Hope this helps, -dave -- David Hempy Internet Database Administrator Kentucky Educational Television From tom at squarefish.com Wed Feb 9 14:16:47 2000 From: tom at squarefish.com (Tom Scanlan) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Re: Test / question on date stuff References: <20000209153359.12812.qmail@web1104.mail.yahoo.com> Message-ID: <000f01bf733a$97d9e440$6e4af6cf@qx.net> Dates are hard. They always blow my mind unless I'm doing something in the middle of a month, but the edges.... ouch. I've got two ideas; one easy, and one more difficult, but fun (: 1) use Date::Calc from CPAN. It handles dates lke you wouldn't believe. You can look up holidays, calculate the number of days (or businesss days... or hours... or months... etc.) between two dates. It's cool. 2) make a circular list of 12 almost circular lists. Each of the 12 lists contain a month. The last day of each month links you to the first day in the next month, or in the case of December, link it back to January first. Then pick your date and cycle through these lists for x days and read out your new day. I think the perl cookbook has an example of circular lists. 0 1 ... 11 1 1 1 2 . . 3 . . . . 31 . 29 . 31 -Tom Scanlan ----- Original Message ----- From: "Carl Rose" To: Sent: Wednesday, February 09, 2000 10:33 AM Subject: LPM: Test / question on date stuff > OK, > I just subscribed and test to see if this gets out > where I want it. Second: I have a question > concerning the incrementation of the day of the month. > I am a newbie of sorts so I ask your forgiveness in > advance for my lack of knowledge. But I am trying to > learn and that is more than most are willing to do. > To wit -- I have a script that needs to rotate date > functions in 28 day intervals- I have the following > code > > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) > = localtime(time); > $mon += 1; > $year = $year +1900; > > print "$mon/$mday/$year \n"; > > It of course returns the date just like I want it > (02/09/2000). So what code do I issue to get 28 days > from now added onto the day and get the correct > rollaround. (ie when you add 28 above you get Feb 37th > -ugg instead of the early part of March). Any help > would be appreciated and go toward good karma. > > Regards, > -C > > > ===== > "The only thing that saves us from the bureaucracy is its inefficiency." > -Eugene McCarthy > __________________________________________________ > Do You Yahoo!? > Talk to your friends online with Yahoo! Messenger. > http://im.yahoo.com From tom at squarefish.com Wed Feb 9 14:21:37 2000 From: tom at squarefish.com (Tom Scanlan) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff References: <4.1.20000209141231.03c6c100@mail.ket.org> Message-ID: <002f01bf733b$44bd8900$6e4af6cf@qx.net> Hehe... or you could do it this way. Sometimes you look to hard for an answer :) -Tom ----- Original Message ----- From: "David Hempy" To: Sent: Wednesday, February 09, 2000 2:18 PM Subject: Re: LPM: Test / question on date stuff > At 07:33 AM 2/9/2000 -0800, you wrote: > > >It of course returns the date just like I want it > >(02/09/2000). So what code do I issue to get 28 days > >from now added onto the day and get the correct > >rollaround. (ie when you add 28 above you get Feb 37th > >-ugg instead of the early part of March). Any help > >would be appreciated and go toward good karma. > > > > time is expressed in seconds since the epoch. You can adjust a time (which > is actually date and time) by adding/subtracting seconds. > > There are 86400 seconds in a day (60*60*24). > > This code will increment a time by 28 days: > > $mytime = time(); > $mytime += 28 * 86400; > > Hope this helps, > -dave > > > -- > David Hempy > Internet Database Administrator > Kentucky Educational Television > > From lothos_25 at yahoo.com Wed Feb 9 14:36:17 2000 From: lothos_25 at yahoo.com (Carl Rose) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Test / question on date stuff: Solved Message-ID: <20000209203617.25246.qmail@web1105.mail.yahoo.com> Hey Everybody, Thanks alot ...I got a lot of good suggestions, all of which worked by the way, heheh. I appreciate the help and the script is done and working. I even got a gold star :) I appreciate the help and will prob we asking alot of questions as I stumble along here at first but hey every step is just anothe hash on the Perl-o-Meter -Carl PS Yes the bad pun was intended :) ===== "The only thing that saves us from the bureaucracy is its inefficiency." -Eugene McCarthy __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com From fprice at mis.net Wed Feb 9 17:41:59 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: www.perl.com: RSS and You (fwd) Message-ID: Thought the list might be like to see this ... some interesting info about Perl 5.6. Forwarded in its entirety so it's kindof long, sorry. -Frank. ____ ____ Frank Price fprice@mis.net Linux: the choice of a GNU generation -|- Why not go mad? ---------- Forwarded message ---------- Date: Tue, 8 Feb 2000 14:17:09 -0800 From: perl-update-admin@lists.songline.com Subject: www.perl.com: RSS and You www.perl.com update -------------------------------------- The Email for www.perl.com Subscribers ============================================================ Sponsored by ApacheCon 2000 Plan to attend the largest gathering of Apache users. ApacheCon 2000, Conference: March 8-10, 2000, Caribe Royale Resort Orlando, Florida. ApacheCon 2000 is the only Apache event to be fully supported by the Apache Software Foundation. Apache founders and leading contributors have designed the technical program, which includes four tracks packed with 40 sessions with over 70+ hours of instruction. Each session is designed to be immediately useful. www.apachecon.com ============================================================ Hello, perl.com subscribers. Big doings this week: Perl 5.5.640 was released! (Note the new version number; in the old version number scheme, this would have been 5.005_64.) This is a development version, and so should only be installed by people who want to test an alpha version of Perl. But it's a sign that the long-awaited Perl 5.6 is on the horizon. One interesting, visible feature of 5.5.640: It has 'version number constants'. You can write require v5.5.640; in a program to require that the Perl version be at least 5.5.640, and you can write if ($VERSION > v1.11) { ... } to test to see if the version number in the variable $VERSION is at least version 1.11. Why not just use ordinary numbers here? Because v1.2 is less than v1.11, even though 1.2 is greater than 1.11. For more complete information, see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-02/msg00160.html or download the complete package from http://www.perl.com/CPAN-local/authors/id/GSAR/perl5.5.640.tar.gz How I Caught the Spam and What I Did With it When I Caught it Some time ago I wrote an article for LinuxPlanet web site about how to use Perl to filter spam out of your email. It was supposed to be a series, but the LinuxPlanet folks changed their minds and cancelled it. I've gotten a lot of mail asking after the rest of the series, and this week the long-awaited second part is online at www.perl.com. Even if you're not interested in spam filtering, drop by for some Perl techniques that you can use in other applications. Conference Paper Deadline Extended The 2000 O'Reilly Perl Conference has extended their paper deadline again. You have until February 18 to submit a 250-word abstract of a paper you'd like to present at the conference. If you were afraid you couldn't afford to go, this may be a good opportunity for you: Paper presenters attend the conference for free. For details, see http://conferences.oreilly.com/perl4/call.html Perl Wins Big in Beanie Awards Slashdot has announced their annual Beanie Awards and the Perl folks cleaned up. Perl luminary Tom Christiansen won the `Best Newbie Helper' award, and `Programming Perl' won the `best book' award. (Tom and Larry are hard at work on the new third edition at this very moment; watch out for it.) Doug McEachern's `mod_perl' won the award for `Best Apache Module'. In case you've been living in a cave for the past few years, `mod_perl' is an Apache plugin module that embeds an entire Perl interpreter into your Apache web server, allowing you to write more Apache plugin modules in Perl, configure your Apache server in Perl, and run Perl programs natively inside the server instead of having to spawn an external CGI process. Lincoln Stein's famous CGI.pm module won the award for `Best Perl Module', defeating DBI.pm. CPAN.pm, and LWP.pm. Regrettably, Larry Wall was beaten out in the `Bessed Dressed' category by Tux the Penguin. Sorry, Larry. Better luck next time. For details: http://slashdot.org/article.pl?sid=00/02/06/1950248&mode=thread Thank you all. I will be in touch again next week. Mark-Jason Dominus Managing Editor RSS and You Real World Perl: RSS and You http://www.perl.com/pub/2000/01/rss.html?wwwrrr_20000126.txt RSS is an XML application that describes web sites as channels, which can act as feeds to a user's site. Chris Nandor explains how to use RSS in Perl and how he uses it to build portals. Article: In Defense of Coding Standards http://www.perl.com/pub/2000/01/CodingStandards.html?wwwrrr_20000126.txt Perl programmers may bristle at the idea of coding standards. Fear not: a few simple standards can improve teamwork without crushing creativity. Article: Virtual Presentations with Perl http://www.perl.com/pub/1999/12/virtual-presentations.html?wwwrrr_20000126.txt This year, the Philadelphia Perl Mongers had joint remote meetings with Boston.pm and St. Louis.pm using teleconferencing equipment to bring a guest speaker to many places at once. Adam Turoff describes what worked and what didn't, and how you can use this in your own PM groups. In Defense of Coding Standards http://www.perl.com/pub/2000/01/12/index.html?wwwrrr_20000126.txt [01/12/2000] Virtual Presentations with Perl http://www.perl.com/pub/1999/12/28/index.html?wwwrrr_20000126.txt [12/28/1999] Sister Sites: --------------------------------- XML.com http://xml.com/ XML from the inside out. Web Review http://www.webreview.com/ The premier online resource for professionals who are working to produce the most innovative, useful, and commercially viable Web Sites today. O'Reilly and Associates http://www.oreilly.com/ O'Reilly computer books, software and online publishing. Style Sheets Guide http://style.webreview.com/ Stay on top of Cascading Style Sheets with the Spec, tutorials, and browser compatibility charts. Web Tools Buyer's Guide http://webreview.com/wr/pub/webtools/ Your comprehensive guide to products, tools and services for today's Web developer. ----------------------------------------------------------------- If you want to cancel a subscription to this newsletter, please email the word "unsubscribe" in the SUBJECT of the message to perl-update-request@lists.songline.com. NOTE: Please make certain to unsubscribe from the email address at which you receive this message For non-automated human help email perllist-admin@songline.com ----------------------------------------------------------------- _______________________________________________ http://lists.songline.com/mailman/listinfo/perl-update From hempy at ket.org Thu Feb 10 23:37:52 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Victory over VFP ODBC! (almost) Message-ID: <4.1.20000210235130.00dca790@mail.ket.org> You all have heard me whining recently over my ODBC woes connecting to a Visual FoxPro data source and writing Memo fields over 255 characters. I've reached a point where I cannot ignore this limitation any more, so I sat out to slay the beast. The good news is...VICTORY! It turns out there is a limitation (I call it a bug) in VFP's ODBC driver of 254 characters for string literals. *Strings* can be longer, but not string literals. So you can't say something like: update sonnet set verse='O Romeo, Romeo, wherefore art thou Romeo? Deny thy father and refuse they name, Or if thou wilt not, be but sworn my love, And I''ll no longer be a Capulet... ''Tis but thy name that is my enemy... What''s Montague? It is not hand, nor foot, Nor arm, nor face, nor any other part Belonging to a man. What''s in a name? That which we call a rose By any other word would smell as sweet.'; ...because the string literal contained within the single quotes is 388 characters long. (In SQL, doubled single quotes represent an apostrophe within the string.) However, you *can* do this: update sonnet set verse='O Romeo, Romeo, wherefore art thou Romeo? Deny thy father and refuse they name, Or if thou wilt not'+ ', be but sworn my love, And I''ll no longer be a Capulet... ''Tis but thy name that is my enemy... Wh'+ 'at''s Montague? It is not hand, nor foot, Nor arm, nor face, nor any other part Belonging to a man'+ '. What''s in a name? That which we call a rose By any other word would smell as sweet.'; I have updated the verse field to be a string made of the concatenation of several smaller string literals, each of which is 100 characters. Note it is not a limitation of the string, but of the string *literal*. Go figure! So I've written a subroutine to break it up, and also escape apostrophes in the string at the same time: >sub VFPQuoteStr { > my $splitstring = shift; > > # SQL-escape all apostrophes: > $splitstring =~ s/'/''/g; > > # insert "'+'" every N characters: > $splitstring =~ s/(.{250})/$1'+'/gs; > > # if the original string was a multiple of 250 characters, > # an error is generated when the string ends in "...blah'+''" > # Trim off a potential trailing null string: > $splitstring =~s/'\+'$//; > > # encase the final product in single quotes: > return "'$splitstring'"; >} ...grr...Now for the bad news... Okay, so I start to really load it down after writing this much of my victory memoirs. All my tests have been 300-400 characters up until now. I start throwing several-KB values at it, and start getting runtime exceptions again! A little playing around, and the closest I can narrow it down is "somewhere around 500 bytes". Depending on how I split it, it starts crashing between around 450 to 510 characters. I'm pretty sure it's not a 512 byte limit, not of the resulting string nor of the "concatenating strings". Ugh. Just when I had popped the cork. Okay...I concede for the evening...I'm going home. Anyone have any ideas? -dave |-( ps. If anyone has any cool improvements to my VFPQuoteStr() sub, I'd love to see them. -- David Hempy Internet Database Administrator Kentucky Educational Television From sungo at earthling.net Sat Feb 12 15:47:22 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: portable dbm files Message-ID: after much cpan digging and what not, i think i've found a way to create portable dbm files. solution: use Storable. use MLDBM qw(DB_File Storable); tie %data, 'MLDBM','file.db',O_CREAT|O_RDWR,0640 or die; (tied %data)->DumpMeth('portable'); that, for me at least, is creating machine independent binary dbms. i'm pretty happy about it. :) --------------------- Matt Cashner sungo@earthling.net --------------------- "That which does not kill me postpones the inevitable." From repett0 at sac.uky.edu Mon Feb 14 12:31:15 2000 From: repett0 at sac.uky.edu (repett0@sac.uky.edu) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: MEETINGS OF OTHER GROUPS Message-ID: UKLUG meeting is cancelled this week due to "Me" being busy.. UKLUG next meeting will be next tuesday(not tomorrow),... with a talk on Python at 7pm in I-62 of Young Library TONIGHT is the Computer Science Undergraduate Seminar meeting. It is at 6pm at the computer lab in King South Microlab(glass room). All are invited. If you need better directions I'll send them on request. PERLMONGERS Will be having a meeting next monday topic? Can somebody more active in the P-Mong send UKLUG some details... Thanks Ron Petty UKLUG treasurer PERL wanna be From rbowen at rcbowen.com Mon Feb 14 12:39:52 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: MEETINGS OF OTHER GROUPS References: Message-ID: <38A84BF8.763F1283@rcbowen.com> repett0@sac.uky.edu wrote: ... > PERLMONGERS > Will be having a meeting next monday topic? Can somebody more active in > the P-Mong send UKLUG some details... Each month, the meeting details, including the topic, are posted on the Lexington.pm web site at http://lexington.pm.org/ This month, the web site says: The February meeting will be held on Monday, Feb 21st, at KET, at 6pm. Rich Bowen will be speaking about Text::Template, and using it for CGI (as well as other) programming. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From repett0 at sac.uky.edu Mon Feb 21 15:57:55 2000 From: repett0 at sac.uky.edu (repett0@sac.uky.edu) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Python Presentation Outline (fwd) Message-ID: Here is the outline for the Python demo and talk at Young Library tuesday in room I-62 at 7pm. UKLUG Ron ---------- Forwarded message ---------- Date: Mon, Feb 21 2000 16:42:41 GMT-0500 From: brians@qx.net Reply-To: llug@ox.slug.louisville.edu To: llug@ox.slug.louisville.edu Subject: Python Presentation Outline Below is my tentative outline for Python Discussion. Some material may be cut depending on time as this presentation will not be longer than 50 mins. (A mind can only endure as long as the seat can.) I suspect that this will be a whirl-wind tour of Python, so I will try to bring printed copies of python scripts used in the presentation, so you can review the material later. 0 - What is Python and where to get it 1 - Data types 2 - Data structures 3 - Flow Control 4 - Functions 5 - Classes and OO in Python 6 - I/O 7 - Exceptions 8 - Modules 9 - JPython* * Java programmers; If you don't already know about JPython, you will NOT WANT TO MISS my discussion of JPython. - Brian S From repett0 at sac.uky.edu Tue Feb 22 08:50:54 2000 From: repett0 at sac.uky.edu (repett0@sac.uky.edu) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: MEETING TONIGHT Message-ID: Room I-62 Young Library 7pm UKLUG speaker Brian -- topic Python -- be there or be square. Ron From rbowen at rcbowen.com Wed Feb 23 15:00:46 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Nat Torkington? Message-ID: <38B44A7E.67ECCFB5@rcbowen.com> The rumor is that Nat Torkington is coming to town next week. Is someone going to arrange for us to take him to dinner, or for drinks, or bowling, or something? Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Wed Feb 23 15:00:01 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Next month's meeting Message-ID: <38B44A51.39BA03A1@rcbowen.com> Thanks to everyone that showed up for the February meeting. And, of course, I've got to start needling you about next month. We need someone to speak on something next month, or for some folks to suggest topics. I won't be volunteering next month, as I'll be in Florida the whole week prior to the meeting, and won't have time to think about it. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From ken.rietz at asbury.edu Wed Feb 23 15:42:10 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: RE: Next month's meeting Message-ID: > And, of course, I've got to start needling you about next > month. We need > someone to speak on something next month, or for some folks to suggest > topics. I won't be volunteering next month, as I'll be in Florida the > whole week prior to the meeting, and won't have time to think > about it. Didn't we already volunteer Keith? Or do you need us to volunteer some more people :-) -- Ken From rbowen at rcbowen.com Wed Feb 23 20:35:39 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: DBI woes Message-ID: <38B498FB.9892F612@rcbowen.com> OK, I've been beating my head against this for about 30 minutes. Can one of you fine folks tell me the obvious thing that I'm missing? This: foreach $ID (@conflicts) { $sth = $dbh->prepare("select day from reservation where ID = $ID"); $sth->execute; ($day) = $sth->fetchrow_array; print "$day\n"; } is printing a list of days, as expected. However, this (which is, in theory, better) $sth = $dbh->prepare("select day from reservation where ID = ?"); foreach $ID (@conflicts) { $sth->execute($ID); ($day) = $sth->fetchrow_array; print "$day\n"; } Only prints every other record. Am I missing something obvious? I'd like to do it the faster way, but it's giving me bogus results. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From dpitts at mk.net Wed Feb 23 21:40:14 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Re: DBI woes References: <38B498FB.9892F612@rcbowen.com> Message-ID: <010b01bf7e78$dcf0b100$7801a8c0@adverb.com> Rich, Here is what you have: > $sth = $dbh->prepare("select day from reservation > where ID = ?"); > foreach $ID (@conflicts) { > $sth->execute($ID); > ($day) = $sth->fetchrow_array; > print "$day\n"; > } I would have thought (and not having checked this on the computer), that it would have been more like this: $sql= <prepare_cached($sql) or die "\nSQL is $sql\n"; $sth->execute($ID);; while ($sth->fetch){ print "$day\n" } Although my sql is kinda new, so I may not have the SELECT statement exactly correct. Thanks, David David Pitts President, Professional Consulting Services www.dpitts.com dpitts@mk.net ----- Original Message ----- From: Rich Bowen To: perl mongers Sent: Wednesday, February 23, 2000 9:35 PM Subject: LPM: DBI woes > OK, I've been beating my head against this for about 30 minutes. Can one > of you fine folks tell me the obvious thing that I'm missing? > > This: > > foreach $ID (@conflicts) { > $sth = $dbh->prepare("select day from reservation > where ID = $ID"); > $sth->execute; > ($day) = $sth->fetchrow_array; > print "$day\n"; > } > > is printing a list of days, as expected. > > However, this (which is, in theory, better) > > > $sth = $dbh->prepare("select day from reservation > where ID = ?"); > foreach $ID (@conflicts) { > $sth->execute($ID); > ($day) = $sth->fetchrow_array; > print "$day\n"; > } > > Only prints every other record. > > Am I missing something obvious? I'd like to do it the faster way, but > it's giving me bogus results. > > Rich > -- > http://www.ApacheUnleashed.com/ > Lexington Perl Mongers - http://lexington.pm.org/ > PGP Key - http://www.rcbowen.com/pgp.txt > From rbowen at rcbowen.com Wed Feb 23 21:53:39 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Re: DBI woes References: <38B498FB.9892F612@rcbowen.com> <010b01bf7e78$dcf0b100$7801a8c0@adverb.com> Message-ID: <38B4AB43.7C9A4B4C@rcbowen.com> David Pitts wrote: > > Rich, > Here is what you have: > > $sth = $dbh->prepare("select day from reservation > > where ID = ?"); > > foreach $ID (@conflicts) { > > $sth->execute($ID); > > ($day) = $sth->fetchrow_array; > > print "$day\n"; > > } > > I would have thought (and not having checked this on the computer), that it > would have been more like this: > > $sql= < SELECT day > FROM reservation > WHERE ID = ? > EOT > $sth = $dbh ->prepare_cached($sql) or die "\nSQL is $sql\n"; > $sth->execute($ID);; > while ($sth->fetch){ print "$day\n" } No, I definately want to loop through an array of IDs, and execute the statement once for each one. And there's only one day for each ID (ID is a unique field - autoincrement thingy) so it's not while ($sth->fetch) The comparable example from the DBI docs is: $sth = $dbh->prepare("insert into table(foo,bar,baz) values (?,?,?)"); while() { chop; my ($foo,$bar,$baz) = split /,/; $sth->execute( $foo, $bar, $baz ); } But it can also be used for selects. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From dpitts at mk.net Wed Feb 23 22:08:20 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Re: DBI woes References: <38B498FB.9892F612@rcbowen.com> <010b01bf7e78$dcf0b100$7801a8c0@adverb.com> <38B4AB43.7C9A4B4C@rcbowen.com> Message-ID: <012c01bf7e7c$caa7c3e0$7801a8c0@adverb.com> okay, second thought... $sql= <prepare_cached($sql) or die "\nSQL is $sql\n"; foreach $ID (@conflicts) { $sth->execute($ID); ($day) = $sth->fetchrow_array; print "$day\n"; } Thanks, David David Pitts President, Professional Consulting Services www.dpitts.com dpitts@mk.net ----- Original Message ----- From: Rich Bowen To: Sent: Wednesday, February 23, 2000 10:53 PM Subject: Re: LPM: Re: DBI woes > David Pitts wrote: > > > > Rich, > > Here is what you have: > > > $sth = $dbh->prepare("select day from reservation > > > where ID = ?"); > > > foreach $ID (@conflicts) { > > > $sth->execute($ID); > > > ($day) = $sth->fetchrow_array; > > > print "$day\n"; > > > } > > > > I would have thought (and not having checked this on the computer), that it > > would have been more like this: > > > > $sql= < > SELECT day > > FROM reservation > > WHERE ID = ? > > EOT > > $sth = $dbh ->prepare_cached($sql) or die "\nSQL is $sql\n"; > > $sth->execute($ID);; > > while ($sth->fetch){ print "$day\n" } > > No, I definately want to loop through an array of IDs, and execute the > statement once for each one. And there's only one day for each ID (ID is > a unique field - autoincrement thingy) so it's not while ($sth->fetch) > > The comparable example from the DBI docs is: > > $sth = $dbh->prepare("insert into table(foo,bar,baz) values (?,?,?)"); > while() { > chop; > my ($foo,$bar,$baz) = split /,/; > $sth->execute( $foo, $bar, $baz ); > } > > But it can also be used for selects. > > Rich > -- > http://www.ApacheUnleashed.com/ > Lexington Perl Mongers - http://lexington.pm.org/ > PGP Key - http://www.rcbowen.com/pgp.txt > From grdodson at lexmark.com Wed Feb 23 23:02:24 2000 From: grdodson at lexmark.com (Graydon Dodson) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Nat Torkington? Message-ID: <200002240502.AAA24934@interlock2.lexmark.com> >The rumor is that Nat Torkington is coming to town next week. Is someone >going to arrange for us to take him to dinner, or for drinks, or >bowling, or something? Just got an Email from Nat. He is interested in something toward the end of the week. Since he normally flys out Friday I guess that leaves Wed or Thursday. Any Preferences? Thanks. Graydon Dodson grdodson@lexmark.com Lexmark International Inc. From dpitts at mk.net Wed Feb 23 23:02:47 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Re: Nat Torkington? References: <200002240502.AAA24934@interlock2.lexmark.com> Message-ID: <013b01bf7e84$64d00340$7801a8c0@adverb.com> Wednesday for me. Thanks, David David Pitts President, Professional Consulting Services www.dpitts.com dpitts@mk.net ----- Original Message ----- From: Graydon Dodson To: Sent: Thursday, February 24, 2000 12:02 AM Subject: LPM: Nat Torkington? > > >The rumor is that Nat Torkington is coming to town next week. Is someone > >going to arrange for us to take him to dinner, or for drinks, or > >bowling, or something? > > > Just got an Email from Nat. He is interested in something toward the end > of the week. Since he normally flys out Friday I guess that leaves Wed or > Thursday. > > Any Preferences? > > > > Thanks. > > Graydon Dodson grdodson@lexmark.com > Lexmark International Inc. > From wsheldahl at qx.net Wed Feb 23 23:24:50 2000 From: wsheldahl at qx.net (Wesley) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: DBI woes References: <38B498FB.9892F612@rcbowen.com> Message-ID: <38B4C0A2.EEA267A@qx.net> Rich, When it prints every other record, does it print a blank line in between? If so, then $day is empty and there's something wrong with the data or the way it's being fetched. If not, I wonder if fetchrow_array could possibly be grabbing two days at a time, and discarding the second one since you just have one scalar to hold the results. I've always used while ($sth->fetch) and haven't touched fetchrow_array, but I always thought fetchrow_array was for when you wanted to get several fields at once. Looks like you're just getting one value each time through the loop. Single-stepping through the loop with a debugger might help here. So in a nutshell, I would try changing that one line to: $day = $sth->fetch; as long as you're sure it will always return a record and don't have to test for that possibility. I would also use $dbh->prepare_cached as David suggested because I think the most recent DBI docs recommend it, though I don't think that will affect your problem one way or the other. OTOH it might! :-) Another option would be to bind the column ahead of time, just for the sake of doing it differently. I think this would look something like: $sth = $dbh->prepare_cached($sql); $sth->bind_col(\$day); foreach $ID (@conflicts) $sth->execute($ID); $sth->fetch; print "$day\n"; } only with proper syntax etc. Hope something here helps, if you haven't already solved this. -- Wes Sheldahl wsheldahl@qx.net From rbowen at rcbowen.com Thu Feb 24 08:04:16 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: DBI woes References: <38B498FB.9892F612@rcbowen.com> <38B4C0A2.EEA267A@qx.net> Message-ID: <38B53A60.970A5684@rcbowen.com> Wesley wrote: > > Rich, > When it prints every other record, does it print a blank line in > between? If so, then $day is empty and there's something wrong with the > data or the way it's being fetched. If not, I wonder if fetchrow_array > could possibly be grabbing two days at a time, and discarding the second > one since you just have one scalar to hold the results. I've always > used while ($sth->fetch) and haven't touched fetchrow_array, but I > always thought fetchrow_array was for when you wanted to get several > fields at once. Well, one or more. ->fetch is an alias to ->fetchrow_arrayref, and so returns an array reference, which is not really what I want. fetchrow_array returns one row of the select as an array. If you only selected one field, it returns that one field in an array, which is what I want. I use the technique all the time. > Looks like you're just getting one value each time > through the loop. Single-stepping through the loop with a debugger > might help here. I might end up doing that, since this is some code in which speed is pretty important. Trying to compensate for the ghastly slowness of the MS Access ODBC driver. > So in a nutshell, I would try changing that one line to: > $day = $sth->fetch; I'm confused on this one. Now $day is an array reference, right? Do you use this in actual code? That is, is $day actually a field from the database. Does the method do some sort of wantarray in there, and intuit what you want? > as long as you're sure it will always return a record and don't have to > test for that possibility. I would also use $dbh->prepare_cached as > David suggested because I think the most recent DBI docs recommend it, > though I don't think that will affect your problem one way or the > other. OTOH it might! :-) Yeah. I did not quite understand the difference between prepare and prepare_cached. It seems that the only difference is that if you re-call the statement handle with the same arguments, it does not actually contact the database, but just returns the value it got last time. While I can certainly see that there are situations where this would be useful, this is not one of them. Now that I am aware of it, I can see other places where I'd like to use it, though. > Another option would be to bind the column ahead of time, just for the > sake of doing it differently. I think this would look something like: > > $sth = $dbh->prepare_cached($sql); > $sth->bind_col(\$day); > foreach $ID (@conflicts) > $sth->execute($ID); > $sth->fetch; > print "$day\n"; > } > only with proper syntax etc. Nope, can't do that. You have to execute before you can bind_columns. Darn. Thanks for the help, but I'm still befuddled. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From fprice at mis.net Thu Feb 24 17:36:05 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Nat Torkington? In-Reply-To: <200002240502.AAA24934@interlock2.lexmark.com> Message-ID: On Thu, 24 Feb 2000, Graydon Dodson wrote: > > >The rumor is that Nat Torkington is coming to town next week. Is someone > >going to arrange for us to take him to dinner, or for drinks, or > >bowling, or something? > > > Just got an Email from Nat. He is interested in something toward the end > of the week. Since he normally flys out Friday I guess that leaves Wed or > Thursday. > > Any Preferences? Either one is OK with me. Are we talking about 6-7pm? -Frank. From rbowen at rcbowen.com Thu Feb 24 17:49:47 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: Nat Torkington? References: <200002240502.AAA24934@interlock2.lexmark.com> Message-ID: <38B5C39B.20898D07@rcbowen.com> Graydon Dodson wrote: > ... > Just got an Email from Nat. He is interested in something toward the end > of the week. Since he normally flys out Friday I guess that leaves Wed or > Thursday. > > Any Preferences? Wed is best for me. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From wsheldahl at qx.net Thu Feb 24 18:15:54 2000 From: wsheldahl at qx.net (Wesley) Date: Thu Aug 5 00:05:40 2004 Subject: LPM: DBI woes References: <38B498FB.9892F612@rcbowen.com> <38B4C0A2.EEA267A@qx.net> <38B53A60.970A5684@rcbowen.com> Message-ID: <38B5C9BA.EC49297C@qx.net> > > So in a nutshell, I would try changing that one line to: > > $day = $sth->fetch; > > I'm confused on this one. Now $day is an array reference, right? Do you > use this in actual code? That is, is $day actually a field from the > database. Does the method do some sort of wantarray in there, and intuit > what you want? Uh, best answer to that is OOPS! Please ignore that one-liner change. :-) > > as long as you're sure it will always return a record and don't have to > > test for that possibility. I would also use $dbh->prepare_cached as > > David suggested because I think the most recent DBI docs recommend it, > > though I don't think that will affect your problem one way or the > > other. OTOH it might! :-) > > Yeah. I did not quite understand the difference between prepare and > prepare_cached. It seems that the only difference is that if you re-call > the statement handle with the same arguments, it does not actually > contact the database, but just returns the value it got last time. While > I can certainly see that there are situations where this would be > useful, this is not one of them. Now that I am aware of it, I can see > other places where I'd like to use it, though. Yes, prepare_cached returns the same statement handle. Mind you, this is not necessarily the same as the same value from the query, just the same statement handle. For databases like SQL Server or Oracle, I think this would be more of a gain, since preparing a statement is a distinct step that might be able to be saved or speeded up with this method. May not help much with Access though. > > Another option would be to bind the column ahead of time, just for the > > sake of doing it differently. I think this would look something like: > > > > $sth = $dbh->prepare_cached($sql); > > $sth->bind_col(\$day); > > foreach $ID (@conflicts) > > $sth->execute($ID); > > $sth->fetch; > > print "$day\n"; > > } > > only with proper syntax etc. > > Nope, can't do that. You have to execute before you can bind_columns. > Darn. Darn it. I knew you had to do something before bind_col, I was hoping prepare was all. Hmmm, seems the docs say that whether you have to execute first depends on the driver. Looks like my DBI is rusting fast. -- Wes Sheldahl wsheldahl@qx.net From fprice at mis.net Thu Feb 24 22:39:40 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Next month's meeting In-Reply-To: <38B44A51.39BA03A1@rcbowen.com> Message-ID: On Wed, 23 Feb 2000, Rich Bowen wrote: > And, of course, I've got to start needling you about next month. We need > someone to speak on something next month, or for some folks to suggest > topics. I won't be volunteering next month, as I'll be in Florida the > whole week prior to the meeting, and won't have time to think about it. Well, I could talk a little about using the debugger. I don't use it for anything real fancy but it is very useful. Just a suggestion... -Frank. From oneiros at dcr.net Fri Feb 25 05:26:54 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes In-Reply-To: <38B53A60.970A5684@rcbowen.com> Message-ID: On Thu, 24 Feb 2000, Rich Bowen wrote: > Well, one or more. ->fetch is an alias to ->fetchrow_arrayref, and so > returns an array reference, which is not really what I want. > fetchrow_array returns one row of the select as an array. If you only > selected one field, it returns that one field in an array, which is what > I want. I use the technique all the time. > > So in a nutshell, I would try changing that one line to: > > $day = $sth->fetch; > > I'm confused on this one. Now $day is an array reference, right? Do you > use this in actual code? That is, is $day actually a field from the > database. Does the method do some sort of wantarray in there, and intuit > what you want? If it's returning an array ref, can't you just do: ($day) = $sth->fetch; (I'd look up how I normally do things, but I don't have my normal access right now) ----- Joe Hourcle From fireston at lexmark.com Fri Feb 25 07:54:05 2000 From: fireston at lexmark.com (Mik Firestone) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes In-Reply-To: Message-ID: <200002251354.IAA19035@interlock2.lexmark.com> On Fri, 25 Feb 2000, Joe Hourcle wrote: > > If it's returning an array ref, can't you just do: > > ($day) = $sth->fetch; > > (I'd look up how I normally do things, but I don't have my normal access > right now) > I do not think that will do what you think it will. $str->fetch returns a reference - which is a scalar thingy. You are trying to coerce a scalar into a list context and I believe the perl docs explicitly state the results are undefined. Without a great deal of testing, I think $sth->fetch->[0] would work. Still doesn't solve Rich's problem, though. Mik -- Mik Firestone fireston@lexmark.com When I become an Evil Overlord: Shooting is _not_ too good for my enemies. From rbowen at rcbowen.com Fri Feb 25 08:57:31 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes References: <200002251354.IAA19035@interlock2.lexmark.com> Message-ID: <38B6985B.47CF81B8@rcbowen.com> Mik Firestone wrote: > > On Fri, 25 Feb 2000, Joe Hourcle wrote: > > > > > If it's returning an array ref, can't you just do: > > > > ($day) = $sth->fetch; > > > > (I'd look up how I normally do things, but I don't have my normal access > > right now) > > > I do not think that will do what you think it will. $str->fetch returns a > reference - which is a scalar thingy. You are trying to coerce a scalar into > a list context and I believe the perl docs explicitly state the results are > undefined. Without a great deal of testing, I think $sth->fetch->[0] would > work. Still doesn't solve Rich's problem, though. I think I'm convinced that this is some sort of bizarre problem with the MS Access driver. I certainly don't get this every-other behavior with MySQL. This code was just supposed to work on MS Access, and, of course, MS has chosen to do some things differently. Helpful (but completely unrelated) tip: With MS Access, you can't say, in a SQL statement ... where ID != 1 This causes the ODBC driver to choke. You have to say where ID <> 1 Isn't that good to know? Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From janine.ladick at fetterprinting.com Fri Feb 25 09:53:51 2000 From: janine.ladick at fetterprinting.com (Janine Ladick) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes In-Reply-To: <38B6985B.47CF81B8@rcbowen.com> Message-ID: <200002251549.KAA27124@sidewinder.fetterprinting.com> > I think I'm convinced that this is some sort of bizarre problem with the > MS Access driver. I certainly don't get this every-other behavior with > MySQL. This code was just supposed to work on MS Access, and, of course, > MS has chosen to do some things differently. David Hempy was having similar weird results with the OBCD driver connecting to FoxPro databases. I think his solution was to dump DBI and go with something else...you might want to email him to ask more about his solution. Janine ------- Janine Ladick Manager, Data Processing Fetter Printing Company 502-634-4771 x. 310 From rbowen at rcbowen.com Fri Feb 25 09:59:24 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes References: <200002251549.KAA27124@sidewinder.fetterprinting.com> Message-ID: <38B6A6DC.7EE73A95@rcbowen.com> Janine Ladick wrote: > > > I think I'm convinced that this is some sort of bizarre problem with the > > MS Access driver. I certainly don't get this every-other behavior with > > MySQL. This code was just supposed to work on MS Access, and, of course, > > MS has chosen to do some things differently. > > David Hempy was having similar weird results with the OBCD driver > connecting to FoxPro databases. I think his solution was to dump > DBI and go with something else...you might want to email him to ask > more about his solution. Unfortunately, using Win32::ODBC is not an option in my case, because it has to work on Linux too. I don't have the time (or the patience) to maintain two versions of the code. *sigh* Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From janine.ladick at fetterprinting.com Fri Feb 25 10:13:04 2000 From: janine.ladick at fetterprinting.com (Janine Ladick) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes In-Reply-To: <38B6A6DC.7EE73A95@rcbowen.com> Message-ID: <200002251608.LAA28947@sidewinder.fetterprinting.com> > Unfortunately, using Win32::ODBC is not an option in my case, because it > has to work on Linux too. I don't have the time (or the patience) to > maintain two versions of the code. *sigh* You really *are* screwed, aren't you? Okay, this is a bad suggestion and I know it, but I feel your pain and am compelled to offer a band-aid. What about using the MS Access driver to connect to the table and copy it to a temp table in another format (dBASE, CSV, whatever). Then use the appropriate DBD for that format to pull the rows you want from the temp table. When done, delete the temp table. It's ugly but it just might work. Janine P.S. Any chance you could find a non-Microsoft driver for Access? ------- Janine Ladick Manager, Data Processing Fetter Printing Company 502-634-4771 x. 310 From fprice at mis.net Sun Feb 27 13:21:12 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? In-Reply-To: <38B44A7E.67ECCFB5@rcbowen.com> Message-ID: On Wed, 23 Feb 2000, Rich Bowen wrote: # The rumor is that Nat Torkington is coming to town next week. Is someone # going to arrange for us to take him to dinner, or for drinks, or # bowling, or something? Has anything been finalized about this? I heard lots of votes for Wed. Let me know if I can help with any arranging. -Frank. From rbowen at rcbowen.com Sun Feb 27 14:18:29 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Next month's meeting References: Message-ID: <38B98695.C07CD08D@rcbowen.com> Frank Price wrote: > ... > Well, I could talk a little about using the debugger. I don't use it for > anything real fancy but it is very useful. Just a suggestion... > > -Frank. That sounds good to me. We had a talk a while ago about the debugger, but I'd like to learn more about it. I expect that even if you talked about all the same stuff, it would be beneficial to some of the folks that were not there the last time. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From grdodson at lexmark.com Sun Feb 27 16:05:44 2000 From: grdodson at lexmark.com (Graydon Dodson) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? Message-ID: <200002272205.RAA08168@interlock2.lexmark.com> I have not finalized anything with Nat yet. I was going to talk to him Monday and then send out a note. Since the vote is leaning towards Wed. that's the day I am going to shoot for. Any preferences as to where? (JoeB's was way to noisy, but the Lexington City Brewery seemed to work out last time. Graydon Dodson grdodson@lexmark.com Lexmark International Inc. ----- Begin Included Message ----- >From owner-lexington-pm-list%happyfunball.pm.org@interlock.lexmark.com Sun Feb 27 14:23 EST 2000 X-Authentication-Warning: happyfunball.pm.org: mjordomo set sender to owner-lexington-pm-list@pm.org using -f Date: Sun, 27 Feb 2000 14:21:12 -0500 (EST) From: Frank Price X-Sender: fprice@localhost.localdomain To: perl mongers Subject: Re: LPM: Nat Torkington? On Wed, 23 Feb 2000, Rich Bowen wrote: # The rumor is that Nat Torkington is coming to town next week. Is someone # going to arrange for us to take him to dinner, or for drinks, or # bowling, or something? Has anything been finalized about this? I heard lots of votes for Wed. Let me know if I can help with any arranging. -Frank. ----- End Included Message ----- From rbowen at rcbowen.com Sun Feb 27 16:16:16 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? References: <200002272205.RAA08168@interlock2.lexmark.com> Message-ID: <38B9A230.2D5FB22@rcbowen.com> Graydon Dodson wrote: > > I have not finalized anything with Nat yet. I was going to talk to him > Monday and then send out a note. Since the vote is leaning towards Wed. > that's the day I am going to shoot for. Any preferences as to where? > (JoeB's was way to noisy, but the Lexington City Brewery seemed to work > out last time. LCB works for me. As long as we call ahead to get a largish table. Do we have a count of who is coming? Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From grdodson at lexmark.com Sun Feb 27 16:27:47 2000 From: grdodson at lexmark.com (Graydon Dodson) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? Message-ID: <200002272227.RAA10266@interlock2.lexmark.com> > LCB works for me. As long as we call ahead to get a largish table. Do we > have a count of who is coming? One good thing about LCB is that it is rarely full on a weekday. I don't have a count but I would think that ~15 should cover it. Is there any reason to expect more than last time? Thanks. Graydon Dodson grdodson@lexmark.com Lexmark International Inc. From grdodson at lexmark.com Sun Feb 27 19:46:41 2000 From: grdodson at lexmark.com (Graydon Dodson) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington Message-ID: <200002280146.UAA19509@interlock2.lexmark.com> Just heard from Nat, Wed.is a go. And if there are no complaints Lexington City Brewery is the place. Now all we need is a time. Is 6 to 8ish OK? If so I will go ahead and call it in. Graydon From janine.ladick at fetterprinting.com Mon Feb 28 08:36:02 2000 From: janine.ladick at fetterprinting.com (Janine Ladick) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? In-Reply-To: <38B9A230.2D5FB22@rcbowen.com> Message-ID: <200002281431.JAA27159@sidewinder.fetterprinting.com> > LCB works for me. As long as we call ahead to get a largish table. Do we > have a count of who is coming? I'll be there. Janine ------- Janine Ladick Manager, Data Processing Fetter Printing Company 502-634-4771 x. 310 From hempy at ket.org Mon Feb 28 13:39:48 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: DBI woes In-Reply-To: <38B6A6DC.7EE73A95@rcbowen.com> References: <200002251549.KAA27124@sidewinder.fetterprinting.com> Message-ID: <4.3.0.20000228143539.056775b0@mail.ket.org> At 10:59 AM 2/25/00 -0500, you wrote: >Janine Ladick wrote: > > > > > I think I'm convinced that this is some sort of bizarre problem with the > > > MS Access driver. I certainly don't get this every-other behavior with > > > MySQL. This code was just supposed to work on MS Access, and, of course, > > > MS has chosen to do some things differently. > > > > David Hempy was having similar weird results with the OBCD driver > > connecting to FoxPro databases. I think his solution was to dump > > DBI and go with something else...you might want to email him to ask > > more about his solution. I ended up doing the popular thing...blaming it all on Microsoft. It seems their FoxPro ODBC driver is broken, in that it does not allow values longer than 254 bytes, even if the data type allows it. I found several references and half-assed workarounds on deja.com, but none that really resolved the problem. Scouring microsoft.com, TechNet, and MSDN yielded no *mention* of the problem, much less a solution. Bastards. There is another company (forget the name) that has an ODBC driver for FoxPro for about $500, but their sales rep wouldn't tell me if it fixed the problem, and I was too lazy and distracted by that point to download it and try. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television From dpitts at mk.net Mon Feb 28 16:51:40 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? References: <200002281431.JAA27159@sidewinder.fetterprinting.com> Message-ID: <003401bf823e$60cb9080$7801a8c0@adverb.com> Did we say that this is a lunch or dinner date? Thanks, David David Pitts President, Professional Consulting Services www.dpitts.com dpitts@mk.net ----- Original Message ----- From: Janine Ladick To: Sent: Monday, February 28, 2000 9:36 AM Subject: Re: LPM: Nat Torkington? > > LCB works for me. As long as we call ahead to get a largish table. > Do we > > have a count of who is coming? > > I'll be there. > > Janine > > > > > > > ------- > Janine Ladick > Manager, Data Processing > Fetter Printing Company > 502-634-4771 x. 310 > From grdodson at lexmark.com Mon Feb 28 17:01:37 2000 From: grdodson at lexmark.com (Graydon Dodson) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? Message-ID: <200002282301.SAA18704@interlock2.lexmark.com> > Did we say that this is a lunch or dinner date? Dinner, lunch time is limited because he has to get back to class. How about 6:00pm on Wed at LCB? Thanks. Graydon Dodson grdodson@lexmark.com Lexmark International Inc. From hempy at ket.org Mon Feb 28 16:59:54 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? In-Reply-To: <003401bf823e$60cb9080$7801a8c0@adverb.com> References: <200002281431.JAA27159@sidewinder.fetterprinting.com> Message-ID: <4.3.2.20000228175927.04e0bae0@mail.ket.org> > > > LCB works for me. As long as we call ahead to get a largish table. > > Do we > > > have a count of who is coming? Count me in. -- David Hempy Internet Database Administrator Kentucky Educational Television From ken.rietz at asbury.edu Mon Feb 28 17:40:00 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? Message-ID: > > Did we say that this is a lunch or dinner date? > > Dinner, lunch time is limited because he has to get back to > class. How about > 6:00pm on Wed at LCB? > I'll try, and several others here will as well. Count us in at mean=2, standard deviation=2. -- Ken Rietz From Thomas.Braun at asbury.edu Mon Feb 28 18:51:52 2000 From: Thomas.Braun at asbury.edu (Thomas.Braun@asbury.edu) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? Message-ID: <012ADA2A00C9D31190F80006293907EF42FFF8@MARK> I'm one of those somewhere in the mean and standard deviation, but I'm planning on it if it helps the count -----Original Message----- From: owner-lexington-pm-list@pm.org [mailto:owner-lexington-pm-list@pm.org]On Behalf Of ken.rietz@asbury.edu Sent: Monday, February 28, 2000 6:40 PM To: lexington-pm-list@happyfunball.pm.org Subject: RE: LPM: Nat Torkington? > > Did we say that this is a lunch or dinner date? > > Dinner, lunch time is limited because he has to get back to > class. How about > 6:00pm on Wed at LCB? > I'll try, and several others here will as well. Count us in at mean=2, standard deviation=2. -- Ken Rietz From sungo at earthling.net Mon Feb 28 18:57:39 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? In-Reply-To: <012ADA2A00C9D31190F80006293907EF42FFF8@MARK> Message-ID: On Mon, 28 Feb 2000 Thomas.Braun@asbury.edu wrote: as am i :) > I'm one of those somewhere in the mean and standard deviation, but I'm > planning on it if it helps the count > > -----Original Message----- > From: owner-lexington-pm-list@pm.org > [mailto:owner-lexington-pm-list@pm.org]On Behalf Of ken.rietz@asbury.edu > Sent: Monday, February 28, 2000 6:40 PM > To: lexington-pm-list@happyfunball.pm.org > Subject: RE: LPM: Nat Torkington? > > > > > Did we say that this is a lunch or dinner date? > > > > Dinner, lunch time is limited because he has to get back to > > class. How about > > 6:00pm on Wed at LCB? > > > > I'll try, and several others here will as well. Count us > in at mean=2, standard deviation=2. > > -- Ken Rietz > --------------------- Matt Cashner sungo@earthling.net --------------------- "That which does not kill me postpones the inevitable." From david at moose.qx.net Tue Feb 29 11:09:37 2000 From: david at moose.qx.net (David Pitts) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? In-Reply-To: <200002282301.SAA18704@interlock2.lexmark.com> from "Graydon Dodson" at Feb 28, 2000 06:01:37 PM Message-ID: <200002291709.MAA21603@moose.qx.net> Count me in. David > > > > Did we say that this is a lunch or dinner date? > > Dinner, lunch time is limited because he has to get back to class. How about > 6:00pm on Wed at LCB? > > > > Thanks. > > Graydon Dodson grdodson@lexmark.com > Lexmark International Inc. > > From fprice at mis.net Tue Feb 29 14:48:38 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Nat Torkington? In-Reply-To: Message-ID: On Mon, 28 Feb 2000, Matt Cashner wrote: #> > Dinner, lunch time is limited because he has to get back to #> > class. How about #> > 6:00pm on Wed at LCB? Oh, and can someone post directions for those not yet familiar with Lexington? Thanks, -Frank. From rbowen at rcbowen.com Tue Feb 29 14:50:24 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Perl class @ LCC Message-ID: <38BC3110.74FF93E6@rcbowen.com> Do any of you guys know the teacher of the Perl course at LCC? Could you give me his email address, please? Thanks. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From gcasillo at ket.org Tue Feb 29 15:10:38 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Perl class @ LCC References: <38BC3110.74FF93E6@rcbowen.com> Message-ID: <38BC35CE.F445061C@ket.org> I believe it's Wayne Beech. A couple KET guys are attending the class. I'll forward this message to them. Gregg From hempy at ket.org Tue Feb 29 15:23:10 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Perl class @ LCC In-Reply-To: <38BC3110.74FF93E6@rcbowen.com> Message-ID: <4.3.2.20000229161910.04e2db70@mail.ket.org> At 03:50 PM 2/29/00 -0500, you wrote: >Do any of you guys know the teacher of the Perl course at LCC? Could you >give me his email address, please? Thanks. > >Rich Wayne Beech I am in the class, NIS-150. It is a first year course, with no programming prerequisites. I knew it wouldn't be challenging, but I had hoped to pick up some things here and there. As it is, I have asked Wayne if I can go ahead and complete the course now (for the credit) or arrange to have more challenging assignments. He seemed receptive to either idea. There has been a lot of interest in a second-semester perl course, according to Wayne. I would be eager to take it. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television From rbowen at rcbowen.com Tue Feb 29 15:39:28 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Perl class @ LCC References: <4.3.2.20000229161910.04e2db70@mail.ket.org> Message-ID: <38BC3C90.224DE130@rcbowen.com> David Hempy wrote: > > At 03:50 PM 2/29/00 -0500, you wrote: > >Do any of you guys know the teacher of the Perl course at LCC? Could you > >give me his email address, please? Thanks. > > > >Rich > > Wayne Beech > > I am in the class, NIS-150. Could you encourage him to mention Perl Mongers in his class, as well as perhaps to attend himself? I think that it might be mutually beneficial. I know how hectic one's schedule can be, being a teacher, but it's worth asking. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From hempy at ket.org Tue Feb 29 15:53:20 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:41 2004 Subject: LPM: Perl class @ LCC In-Reply-To: <38BC3C90.224DE130@rcbowen.com> References: <4.3.2.20000229161910.04e2db70@mail.ket.org> Message-ID: <4.3.2.20000229165218.04d255b0@mail.ket.org> At 04:39 PM 2/29/00 -0500, you wrote: >Could you encourage him to mention Perl Mongers in his class, as well as >perhaps to attend himself? I think that it might be mutually beneficial. >I know how hectic one's schedule can be, being a teacher, but it's worth >asking. > >Rich You bet. I emailed him about the last meeting, but I forgot to mention it in class. (or maybe I didn't go that day. ;-) I'll keep on it. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television