From andy at n2h2.com Wed Dec 1 12:21:30 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python Message-ID: I am passing this on from a twisted (Java programming) friend at ATL: Subject: A morality tale of Perl versus Python Date: Wed, 3 Nov 1999 19:30:01 PST From: funkster@midwinter.com Newsgroups: rec.humor.funny Followup-To: rec.humor.d This has been percolating in the back of my mind for a while. It's a scene from _The Empire Strikes Back_, reinterpreted to serve a valuable moral lesson for aspiring programmers. ___________________________________________________________________________ EXTERIOR: DAGOBAH -- DAY With Yoda strapped to his back, Luke climbs up one of the many thick vines that grow in the swamp until he reaches the Dagobah statistics lab. Panting heavily, he continues his exercises -- grepping, installing new packages, logging in as root, and writing replacements for two-year-old shell scripts in Python. YODA: Code! Yes. A programmer's strength flows from code maintainability. But beware of Perl. Terse syntax... more than one way to do it... default variables. The dark side of code maintainability are they. Easily they flow, quick to join you when code you write. If once you start down the dark path, forever will it dominate your destiny, consume you it will. LUKE: Is Perl better than Python? YODA: No... no... no. Quicker, easier, more seductive. LUKE: But how will I know why Python is better than Perl? YODA: You will know. When your code you try to read six months from now. ___________________________________________________________________________ Selected by Jim Griffith. MAIL your joke to funny@netfunny.com. Attribute the joke's source if at all possible. A Daemon will auto-reply. If you don't need an auto-reply, submit to rhf@netfunny.com instead. For the full submission guidelines, see http://www.netfunny.com/rhf/ This joke's link: http://www.netfunny.com/rhf/jokes/99/Nov/perl.html -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 | Seattle WA 98164-1059 Y2K Complacent | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From byoung at speakeasy.org Wed Dec 1 13:00:42 1999 From: byoung at speakeasy.org (Bradley E. Young) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python In-Reply-To: Message-ID: <000901bf3c2e$5dcc8570$5ac6adcf@byoung.spry.com> Gimme a break. Yeah, I really want a programming language that uses indentation to enclose blocks. I'm going to do my next project in logo or some other kiddie language like python. Betcha I can write unmaintainable code in python. And I can write maintainable perl. I can even write *Literate* Perl (pod is similar to cweb). I'm sick and tired of people complaining that perl can be unmaintainable. If I stick a screwdriver in my eye, it won't feel very good. That doesn't mean that we should cripple the screwdriver to ensure that it won't hurt my eye. This is the same reason that I dislike "object only" languages like Java (what if I just want to write a quick hack, or one-liner?). Brad > -----Original Message----- > From: owner-spug-list@pm.org [mailto:owner-spug-list@pm.org]On Behalf Of > Andrew Sweger > Sent: Wednesday, December 01, 1999 10:22 AM > To: Seattle Perl Users Group > Subject: SPUG: A morality tale of Perl versus Python > > > YODA: You will know. When your code you try to read six months from > now. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From stevesa at microsoft.com Wed Dec 1 12:59:07 1999 From: stevesa at microsoft.com (Steve Sarapata) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python Message-ID: <39ADCF833E74D111A2D700805F1951EF11DC0E21@RED-MSG-06> As Ben Obi-Wan said to the young Jedi programmer: "Use the source, Luke." And I guess YODA probably never heard of remarks in either language. (Just being a spoiler...) -----Original Message----- From: Andrew Sweger [mailto:andy@n2h2.com] Sent: Wednesday, December 01, 1999 10:22 AM To: Seattle Perl Users Group Subject: SPUG: A morality tale of Perl versus Python I am passing this on from a twisted (Java programming) friend at ATL: Subject: A morality tale of Perl versus Python Date: Wed, 3 Nov 1999 19:30:01 PST From: funkster@midwinter.com Newsgroups: rec.humor.funny Followup-To: rec.humor.d This has been percolating in the back of my mind for a while. It's a scene from _The Empire Strikes Back_, reinterpreted to serve a valuable moral lesson for aspiring programmers. ___________________________________________________________________________ EXTERIOR: DAGOBAH -- DAY With Yoda strapped to his back, Luke climbs up one of the many thick vines that grow in the swamp until he reaches the Dagobah statistics lab. Panting heavily, he continues his exercises -- grepping, installing new packages, logging in as root, and writing replacements for two-year-old shell scripts in Python. YODA: Code! Yes. A programmer's strength flows from code maintainability. But beware of Perl. Terse syntax... more than one way to do it... default variables. The dark side of code maintainability are they. Easily they flow, quick to join you when code you write. If once you start down the dark path, forever will it dominate your destiny, consume you it will. LUKE: Is Perl better than Python? YODA: No... no... no. Quicker, easier, more seductive. LUKE: But how will I know why Python is better than Perl? YODA: You will know. When your code you try to read six months from now. ___________________________________________________________________________ Selected by Jim Griffith. MAIL your joke to funny@netfunny.com. Attribute the joke's source if at all possible. A Daemon will auto-reply. If you don't need an auto-reply, submit to rhf@netfunny.com instead. For the full submission guidelines, see http://www.netfunny.com/rhf/ This joke's link: http://www.netfunny.com/rhf/jokes/99/Nov/perl.html -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 | Seattle WA 98164-1059 Y2K Complacent | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From andy at n2h2.com Wed Dec 1 13:15:12 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python In-Reply-To: <000901bf3c2e$5dcc8570$5ac6adcf@byoung.spry.com> Message-ID: [sigh] It's just humor. Folks, don't read too much into that "morality tale". It just leads to dumpster burning and civil disobedience. (Yeah, Brad. I saw you on the news. That bandanna didn't hide your eyes.) Besides, I kinda like the idea that people think I'm on the dark side. On Dec 1, 1999 @ 11:00am, Bradley E. Young wrote: > Gimme a break. Yeah, I really want a programming language that uses > indentation to enclose blocks. I'm going to do my next project in logo or > some other kiddie language like python. -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 | Seattle WA 98164-1059 Y2K Complacent | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From Karl.Hartman at pss.boeing.com Wed Dec 1 13:43:26 1999 From: Karl.Hartman at pss.boeing.com (Hartman, Karl B) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python Message-ID: Yup, just humor. But the response does show how we become emotionally attached to what we do. That's why many of us in this field have a hard time becoming detached from work stuff. If you have any questions or comments, don't hesitate to call. Thanks, Karl Hartman UNIX Server Architecture-USA/Everett - G-5453 System Administration / The Printer Guy 425-294-2047 (office) 206-986-7311 (pager) Business Sense "Failure to embrace an idea just because it doesn't make sense or just plain doesn't work does not constitute resistance to change" Common Sense - from "Really important stuff my kids taught me" It's easier to spend the money in your grandfather's pocket, than the money in your own pocket. > ---------- > From: Andrew Sweger[SMTP:andy@n2h2.com] > Sent: Wednesday, December 01, 1999 11:15 AM > To: Bradley E. Young > Cc: Seattle Perl Users Group > Subject: RE: SPUG: A morality tale of Perl versus Python > > [sigh] > > It's just humor. Folks, don't read too much into that "morality tale". It > just leads to dumpster burning and civil disobedience. (Yeah, Brad. I saw > you on the news. That bandanna didn't hide your eyes.) Besides, I kinda > like the idea that people think I'm on the dark side. > > On Dec 1, 1999 @ 11:00am, Bradley E. Young wrote: > > > Gimme a break. Yeah, I really want a programming language that uses > > indentation to enclose blocks. I'm going to do my next project in logo or > > some other kiddie language like python. > > -- > Andrew Sweger | N2H2, Incorporated > v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 > | Seattle WA 98164-1059 > Y2K Complacent | http://www.n2h2.com/ > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From byoung at speakeasy.org Wed Dec 1 14:45:03 1999 From: byoung at speakeasy.org (Bradley E. Young) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python In-Reply-To: Message-ID: <000a01bf3c3c$f1cd6f60$5ac6adcf@byoung.spry.com> $SIG{'BLECH'}; I figured the whole comparison of python to logo and being a "kiddie" language would plant my response firmly in the sarcasm column. Oh well. I thought it was funny. Brad PS- array indexes are numeric. > -----Original Message----- > From: owner-spug-list@pm.org [mailto:owner-spug-list@pm.org]On Behalf Of > Andrew Sweger > Sent: Wednesday, December 01, 1999 11:15 AM > To: Bradley E. Young > Cc: Seattle Perl Users Group > Subject: RE: SPUG: A morality tale of Perl versus Python > > > [sigh] > > It's just humor. Folks, don't read too much into that "morality tale". It > just leads to dumpster burning and civil disobedience. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From jope-spug at n2h2.com Wed Dec 1 14:50:34 1999 From: jope-spug at n2h2.com (El JoPe Magnifico) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python In-Reply-To: Message-ID: Forget using the force... use strict, Luke! =) =) 'Nuff said. -jp On Wed, 1 Dec 1999, Andrew Sweger wrote: > YODA: Code! Yes. A programmer's strength flows from code maintainability. > But beware of Perl. Terse syntax... more than one way to do it... > default variables. The dark side of code maintainability are they. > Easily they flow, quick to join you when code you write. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Wed Dec 1 15:09:38 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Need Leader for East-side SPUG Chapter Message-ID: <19991201130938.B8969@timji.consultix.wa.com> SPUG-sters, I think it's time to start exploring more fully the prospect of an Eastside-chapter of SPUG, perhaps called E-SPUG. To get this rolling, I'm looking for a volunteer to work on the logistics of this (researching and establishing a meeting schedule, etc.) and to act as the initial leader of that chapter. We already have two options for meeting places, so I see the schedule as the bigger issue at this time. Obviously, that chapter shouldn't meet on 3rd Tuesdays, but beyond that it will take some polling of members to land on the best !Tuesday weekday. Anybody who wants to be considered please Email me with your "qualifications"; I'll give preference to those who are already on the spug-list, who've attended meetings recently, who live or work on the Eastside, who know something about Perl, etc. *============================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | |Classes: 12/7 UNIX Fund; 12/13 Perl+Modules; 1/18 Int. Perl | *============================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From rodneyd at microen.com Wed Dec 1 16:32:34 1999 From: rodneyd at microen.com (Rodney Doe) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python Message-ID: Perhaps the final word? Nov 28, 1999 Seattle Times Classified Ad References Perl: 44 Python: 0 Rodney B. Doe, P.E. Senior Software Engineer Micro Encoder Inc. -----Original Message----- From: El JoPe Magnifico [mailto:jope-spug@n2h2.com] Sent: Wednesday, December 01, 1999 12:51 PM To: Seattle Perl Users Group Subject: Re: SPUG: A morality tale of Perl versus Python Forget using the force... use strict, Luke! =) =) 'Nuff said. -jp On Wed, 1 Dec 1999, Andrew Sweger wrote: > YODA: Code! Yes. A programmer's strength flows from code maintainability. > But beware of Perl. Terse syntax... more than one way to do it... > default variables. The dark side of code maintainability are they. > Easily they flow, quick to join you when code you write. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From lee_vanhee at easyliving.com Wed Dec 1 16:57:13 1999 From: lee_vanhee at easyliving.com (lee_vanhee@easyliving.com) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Coding Effeciency Message-ID: <99120117571359.10107@weba1.iname.net> You can compare languages by the number of lines required to code a specified functionality. Software Productivity Research Inc. provides such a table. Check it out at: http://www.spr.com/library/0langtbl.htm It takes 2.5 times as many lines of Java or C++ to code a program compared to Perl. It's not only more efficient to code in Perl, but your code will have fewer errors (because errors are proportional to the number of code lines). Lee Lee_VanHee@easyliving.com ---------------------------------------------------------------- Get your free email from AltaVista at http://altavista.iname.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From Richard.Anderson at seaslug.org Wed Dec 1 21:52:53 1999 From: Richard.Anderson at seaslug.org (Richard Anderson) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: A morality tale of Perl versus Python References: Message-ID: <00b101bf3c78$b8986380$d587c7cd@adcom133> Yes, Perl is dominant here in the heartland, where it was developed. Try the same grep in the Munich or Amsterdam paper and Python will probably come out on top, though not as lopsidedly. As with the choice of computing platforms, the choice of languages has as much to do with management/programmer preferences than the merits of the language. Richard.Anderson@seaslug.org www.zipcon.net/~starfire/home (personal) www.raycosoft.com (corporate) ----- Original Message ----- From: "Rodney Doe" To: Sent: Wednesday, December 01, 1999 2:32 PM Subject: RE: SPUG: A morality tale of Perl versus Python > Perhaps the final word? > > Nov 28, 1999 Seattle Times Classified Ad References > Perl: 44 > Python: 0 > > Rodney B. Doe, P.E. > Senior Software Engineer > Micro Encoder Inc. > > > -----Original Message----- > From: El JoPe Magnifico [mailto:jope-spug@n2h2.com] > Sent: Wednesday, December 01, 1999 12:51 PM > To: Seattle Perl Users Group > Subject: Re: SPUG: A morality tale of Perl versus Python > > > Forget using the force... use strict, Luke! =) =) > 'Nuff said. > -jp > > On Wed, 1 Dec 1999, Andrew Sweger wrote: > > YODA: Code! Yes. A programmer's strength flows from code maintainability. > > But beware of Perl. Terse syntax... more than one way to do it... > > default variables. The dark side of code maintainability are they. > > Easily they flow, quick to join you when code you write. > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Dec 2 18:43:30 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: CGI/Web Perl Job, US West Message-ID: <19991202164330.B20745@timji.consultix.wa.com> ----- Forwarded message from Colin Meyer ----- Perl/CGI Programmer Position ---------------------------- Job Description: Web/CGI/Perl software developer needed for developing Web database applications. The candidate will be responsible for the full project development life cycle which includes: scoping out a project, developing estimates developing application requirements, design, development, testing and deployment. Important criteria for the position is someone that can work both independently on a project and on a development team, is resourceful and has good client and team skills. Candidate should also have experience with SQL databases (Oracle preferred) and comfortable working in UNIX (Linux, IRIX and Solaris) environment. Also loves to have fun too. Job Skill Requirements: - 2+ years of Perl/CGI development experience - 2+ years of Web development experience - 1+ years of SQL database development experience, Oracle preferred Desired Skills: - Experience with Apache Web server and mod_perl - Experience with Linux, SGI/IRIX and Sun/Solaris - Object Oriented design/programming experience Pay: $30/hour to $38/hour depending on experience plus 1.5x for overtime. Benefits and 401k included. Start: immediate Type: Full-time Length: permanent If you are interested in working with a young, fun group of Web developers please contact Brian Vallene at 206.345.2065 or email your resume to bvallen@uswest.com or fax it to 206.346.9007. Contact Info: Brian Vallene - 206.345.2065 fax: 206.346.9007 email: bvallen@uswest.com *============================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | |Classes: 12/7 UNIX Fund; 12/13 Perl+Modules; 1/18 Int. Perl | *============================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Sun Dec 5 18:35:20 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Need Speakers for 2000! Message-ID: <19991205163520.A387@timji.consultix.wa.com> SPUG-sters, Our meeting schedule is currently wide-open for the Y2K, so I encourage you all to think about the cool things you've been doing with Perl, and volunteer to share what you've learned with us during one of our upcoming 3rd Tuesday meetings. Or, if you don't have any particular topic in mind, but still want to participate, you could volunteer to lead a discussion on one of the following Perl Cookbook chapters: File Access File Contents Directories Subroutines All the best for the (post-WTO-riot) Holiday Season! -Tim ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ajalis at beryllium.cobaltgroup.com Mon Dec 6 16:38:54 1999 From: ajalis at beryllium.cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Efficiency of Eval Message-ID: <199912062238.OAA20433@beryllium.cobaltgroup.com> Is: eval { some_function_which_calls_die_on_error ($a) ; ; } if ($@) { ; } more efficient, or is: $r = some_function_which_returns_non_zero_on_error ($a) ; if ($r != 0) { } else { . . . ; } more efficient (in terms of speed). (Ignore code typos.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Mon Dec 6 16:46:41 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Job: F5 Webmaster In-Reply-To: <3.0.6.32.19991206143325.00a351e0@web-c.com>; from haakenso@chcs.com on Mon, Dec 06, 1999 at 02:33:25PM -0800 References: <3.0.6.32.19991122134846.00a22750@web-c.com> <199911222202.OAA00758@consultix.wa.com> <3.0.6.32.19991206143325.00a351e0@web-c.com> Message-ID: <19991206144641.A592@timji.consultix.wa.com> We are looking for a candidate that would fill the following job description. It is a permanent position at a fast-paced Internet Infrastructure company. Please send resumes to casey@f5.com. F5 Networks Webmaster (Seattle) We are looking for a top notch Webmaster to manage our Internet and extranet sites. Job Responsibilities: You will be responsible for managing F5's current site, working within the marketing department. You will be a key player in designing and building new and exciting web applications. Develop and maintain Perl scripts running several functions within the site and change the look and feel as appropriate. Experience Level: We need someone that is seasoned with all the right stuff. That means strong programming skills, savvy design abilities along with solid organizational skills. Technically, you need to have a wide-range of capabilities. Requires significant experience creating commercial or organizational web sites with Linux, databases, Perl (very important), HTML, DHTML, JavaScript, Apache server, and CGI. Additional useful skills include Cold Fusion, MySQL, Oracle, networking, running redundant web servers/sites, multi-language sites, and e-commerce applications. Pay range is $35-55,000 and we are located on lower Queen Anne by the Seattle Center. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From charles.e.derykus at boeing.com Mon Dec 6 19:07:53 1999 From: charles.e.derykus at boeing.com (charles.e.derykus@boeing.com) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Efficiency of Eval Message-ID: <199912070107.RAA24535@carios2.ca.boeing.com> > eval { some_function_which_calls_die_on_error ($a) ; ; } > if ($@) { ; } > > more efficient, or is: > > $r = some_function_which_returns_non_zero_on_error ($a) ; > if ($r != 0) { } > else { . . . ; } > > more efficient (in terms of speed). (Ignore code typos.) The simple return will be more efficient. Perl's C is doing a setjump(3C),longjump(3C) under the covers which will involve the added overhead of saving and potentially having to restore the stack environment if there's an exception. Even, if there's no exception, the simple return appears to be bit faster: use Benchmark; timethese( 1_000_000, { 'eval', sub { eval { 1 }; }, 'return ', sub { 1 } } Benchmark: timing 1000000 iterations of eval, return ... eval: 48 secs (43.62 usr 0.00 sys = 43.62 cpu) return : 21 secs (20.20 usr 0.00 sys = 20.20 cpu) Rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From dougb at scalar.org Mon Dec 6 19:25:50 1999 From: dougb at scalar.org (Doug Beaver) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Efficiency of Eval In-Reply-To: <199912062238.OAA20433@beryllium.cobaltgroup.com>; from ajalis@beryllium.cobaltgroup.com on Mon, Dec 06, 1999 at 02:38:54PM -0800 References: <199912062238.OAA20433@beryllium.cobaltgroup.com> Message-ID: <19991206172550.A27319@scalar.org> On Mon, Dec 06, 1999 at 02:38:54PM -0800, Asim Jalis wrote: > Is: > > eval { some_function_which_calls_die_on_error ($a) ; ; } > if ($@) { ; } > > more efficient, or is: > > $r = some_function_which_returns_non_zero_on_error ($a) ; > if ($r != 0) { } > else { . . . ; } > > more efficient (in terms of speed). (Ignore code typos.) Have you tried using Benchmark.pm? It's pretty good at telling you stuff like this. `perldoc Benchmark` for more info. If you don't want to execute the same code block over and over in order to determine the cost, you could also use Devel::SmallProf and Time::HiRes to time execution of the block of code. I really can't guess which one is faster because block eval is parsed at compile time, so the speed difference is probably negligible. I think you should benchmark the two and see which one is faster on your system, and if speed matters that much, then use the one that is faster. If I wanted to implement exceptions, I would choose block eval over checking the return value of the functions even if block eval was slower; I think it's a cleaner implementation and more perlish to check $@ and catch the different exceptions. Also, there's a module named Exceptions.pm on CPAN, I haven't used it, but it has try/catch/throw functionality and the syntax looks pretty good. You might be able to look at it and get some good ideas. It doesn't have perldoc, so you'll have to get your hands a bit dirty and read the source to figure out how it works. Doug -- Smithers: I'm afraid we have a bad image, Sir. Market research shows people see you as somewhat of an ogre. Burns: I ought to club them and eat their bones! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ajalis at beryllium.cobaltgroup.com Mon Dec 6 19:44:30 1999 From: ajalis at beryllium.cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Efficiency of Eval Message-ID: <199912070144.RAA23127@beryllium.cobaltgroup.com> Charles DeRykus writes: > > eval { some_function_which_calls_die_on_error ($a) ; ; } > > if ($@) { ; } > > > > more efficient, or is: > > > > $r = some_function_which_returns_non_zero_on_error ($a) ; > > if ($r != 0) { } > > else { . . . ; } > > > > more efficient (in terms of speed). (Ignore code typos.) > > The simple return will be more efficient. Perl's > C is doing a setjump(3C),longjump(3C) under the > covers which will involve the added overhead of saving > and potentially having to restore the stack environment > if there's an exception. > > Even, if there's no exception, the simple return > appears to be bit faster: > > use Benchmark; > timethese( 1_000_000, > { > 'eval', sub { eval { 1 }; }, > 'return ', sub { 1 } > } > Benchmark: timing 1000000 iterations of eval, return ... > eval: 48 secs (43.62 usr 0.00 sys = 43.62 cpu) > return : 21 secs (20.20 usr 0.00 sys = 20.20 cpu) Neat package. I ran your code with some modifications: use Benchmark; timethese( 10_000_000, { 'eval', sub { eval { sub { die ; }; } }, 'return', sub { eval { sub { return ; }; } }, } ); comparing the whole eval-die cycle with the call-return cycle and got: Benchmark: timing 10000000 iterations of eval, return ... eval: 45 secs (38.98 usr 0.25 sys = 39.23 cpu) return: 49 secs (38.56 usr 0.44 sys = 39.00 cpu) So eval was actually marginally faster. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From charles.e.derykus at boeing.com Mon Dec 6 20:52:28 1999 From: charles.e.derykus at boeing.com (charles.e.derykus@boeing.com) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Efficiency of Eval Message-ID: <199912070252.SAA24775@carios2.ca.boeing.com> > use Benchmark; > timethese( 10_000_000, > { > 'eval', sub { eval { sub { die ; }; } }, > 'return', sub { eval { sub { return ; }; } }, > } > ); > comparing the whole eval-die cycle with the call-return cycle and got: > ... > So eval was actually marginally faster. Um, no. That would just create the code ref's and eliminate the runtime where the real bottlenecks lurk. My benchmark was probably flawed too in a different way. For instance, something like C may be optimized away. I'm convinced though that the 'eval' will be be slower and, markedly, if an exception occurs. rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Tue Dec 7 01:42:25 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Re: eval efficiency Message-ID: <19991206234225.A2835@timji.consultix.wa.com> This got trapped by the Majordomo filter looking for Zubscribe/unZubscribe (s/Z/s/g) requests. I put a before each ^sub, in the hope that this would let the post get through. -Tim ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== ----- Forwarded message from owner-spug-list@pm.org ----- From: owner-spug-list@pm.org Date: Mon, 6 Dec 1999 21:47:00 -0500 (EST) X-Authentication-Warning: happyfunball.pm.org: mjordomo set sender to owner-spug-list@pm.org using -f To: owner-spug-list@pm.org Subject: BOUNCE spug-list@pm.org: Admin request of type /^sub\b/i at line 9 >From tim@consultix-inc.com Mon Dec 6 21:46:58 1999 Received: from rand.csyn.net (dsl016180.midsl.net [216.190.16.180]) by happyfunball.pm.org (8.9.3/8.9.1) with ESMTP id VAA10682 for ; Mon, 6 Dec 1999 21:46:54 -0500 (EST) Received: from localhost (sean@localhost) by rand.csyn.net (8.9.3/8.9.3) with ESMTP id SAA89237; Mon, 6 Dec 1999 18:49:53 -0800 (PST) (envelope-from sean@perlgods.com) Date: Mon, 6 Dec 1999 18:49:53 -0800 (PST) From: Sean Chittenden X-Sender: sean@rand.csyn.net To: Asim Jalis cc: spug-list@pm.org Subject: Re: SPUG: Efficiency of Eval In-Reply-To: <199912062238.OAA20433@beryllium.cobaltgroup.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I dunno, but here's how you'd find out (surprising results at the end, favors eval): #!/usr/bin/perl -w use strict; use Benchmark; sub DieEvalTest() { eval { open FILE, " &DieEvalTest(), 'Eval/die' => &ErrorFlagTest(), } ); # End of file Output of Testing.pl: 18:06 95 sean testing > perl Testing.pl Benchmark: timing 10000000 iterations of Eval/die, ErrorFlag... Eval/die: 3 wallclock secs ( 2.49 usr + -0.06 sys = 2.43 CPU) ErrorFlag: 2 wallclock secs ( 1.41 usr + -0.01 sys = 1.40 CPU) I'd say that the timing mechinism is a bit whonky, but I'd go with variables instead of eval. You could use pre-compiled code for the open: [... Before the DieEvalTest() ...] # Cache Compiled Open bytecode sub CCOBC() { open FILE, " perl Testing2.pl Benchmark: timing 10000000 iterations of Eval/die, ErrorFlag... Eval/die: 2 wallclock secs ( 1.47 usr + 0.05 sys = 1.52 CPU) ErrorFlag: 2 wallclock secs ( 1.67 usr + -0.02 sys = 1.65 CPU) Caching the compiled open code drops almost a full second off of the Eval/die code (which surprised me greatly!). In most cases, however, using the caching scheme above just creates code-bloat, especially since it only saved you an extra .1 second speed increase with 10M iterations. For all intents and purposes, it's easier/quicker to use the ErrorFlag method of dealing w/ things, however, if you want, you can tweak things and get them faster through alternative means (die/eval). --Sean -- Sean Chittenden Want an e-mail alias? On Mon, 6 Dec 1999, Asim Jalis wrote: > Date: Mon, 6 Dec 1999 14:38:54 -0800 > From: Asim Jalis > To: spug-list@pm.org > Subject: SPUG: Efficiency of Eval > > Is: > > eval { some_function_which_calls_die_on_error ($a) ; ; } > if ($@) { ; } > > more efficient, or is: > > $r = some_function_which_returns_non_zero_on_error ($a) ; > if ($r != 0) { } > else { . . . ; } > > more efficient (in terms of speed). (Ignore code typos.) > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > > ----- End forwarded message ----- -- *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* ----- End forwarded message ----- -- *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ajalis at beryllium.cobaltgroup.com Tue Dec 7 11:51:35 1999 From: ajalis at beryllium.cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:09:40 2004 Subject: SPUG: Efficiency of Eval Message-ID: <199912071751.JAA06109@beryllium.cobaltgroup.com> Charles DeRykus wrote: > Asim Jalis wrote: > > use Benchmark; > > timethese( 10_000_000, > > { > > 'eval', sub { eval { sub { die ; }; } }, > > 'return', sub { eval { sub { return ; }; } }, > > } > > ); > > > comparing the whole eval-die cycle with the call-return cycle and got: > > ... > > So eval was actually marginally faster. > > Um, no. That would just create the code ref's and eliminate > the runtime where the real bottlenecks lurk. > > My benchmark was probably flawed too in a different way. > For instance, something like C may be optimized > away. I'm convinced though that the 'eval' will be be slower > and, markedly, if an exception occurs. Good point. Here's another attempt: use Benchmark; sub die_occurs { die; } sub return_occurs { return 1; } timethese( 1_000_000, { 'eval', sub { eval { die_occurs(); } }, 'return', sub { $r = return_occurs(); } } ); The output here was: Benchmark: timing 1000000 iterations of eval, return... eval: 35 secs (15.27 usr 5.27 sys = 20.54 cpu) return: 7 secs ( 4.17 usr 0.07 sys = 4.24 cpu) So eval-die is significantly more expensive than call-return. However, I wonder if this changes when if you have nested calls, in which case die will pop all the functions off the stack at once while return will have to return from each one individually. Personally I prefer eval-die because then the return value can be used for something more useful such as data, and the functions in between the catcher and the thrower don't have to catch the error code and pass-it-on. Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Tue Dec 7 20:19:01 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: New Meeting Place REVEALED! Message-ID: <19991207181901.A5078@timji.consultix.wa.com> SPUG-sters, Here's a summary of recent developments in our search for SPUG meeting places: 1) The HUTCH (our meeting place for the last year) has kicked us out It's been great, thanks for having us! 8-} * In gratitude, I feel we should all pledge to return to the Hutch if/when we get cancer, to give them the benefit of our business. 8-} 2) I finally found time to inspect the SpeakEasy's "backroom", and concluded it's totally inadequate for our needs. It has theater-style seating from 1923, no tables, very dim lighting, no white-board, looks dingy and depressing, and like it might burst into flames at any second. In this room, attendees could not easily manage reference books or take notes, and we'd have to bring in our own projection equipment, white-boards, you name it. I have been in one very similar room in my life, when my wife and I went to see a movie in the tiny town of Berastagi, Indonesia last year (just North of the famous Lake Toba on the island of Sumatra). Unfortunately, we had to leave after about 15 minutes, for fear of being plunged into lifelong feelings of depression. (The crew of Red Dwarf had a similar reaction to the "Despair Squid.) However, in defense of the SpeakEasy, I'd have to say their room had a significantly better odor than the Indonesian movie theater. I can see now why this room is primarily used for poetry readings! By the power invested in me by myself for the benefit of SPUG, I hereby veto this location! (And I didn't even mention the parking problems! 8-}) Sorry Jennifer . . . 3) On further exploration, the complimentary North-end options (Fluke and ATL) turned out to be unworkable, due to their concerns about insufficient staffing for after-hours security that cropped up when we talked further. 4) Despite my recent invitation for aspiring leaders of E-SPUG (Eastside SPUG) to come forward, NO ONE has responded! (They "lurk" well, but can those East-siders do anything more? 8-}). I've got enough on my plate with the original SPUG, so until someone emerges to take charge of E-SPUG, and set up a meeting schedule, etc., the original (one and only) SPUG will continue meeting in Seattle (see below), and Eastsiders will either join us or be left out. (Remember: we've got two solid offerings for meeting rooms on the East-side, from Maxim and Lucent! Would be a shame to waste those!) CONCLUSIONS THE GOOD NEWS: No need to worry about voting for the new meeting location! For the original (and still one and only) SPUG, it's going to have to be N2H2's space at the "Union Bank of California" building in downtown Seattle, since that's the best of the viable options we have left (the other being Exodus Communications, which has a smaller meeting room and all the same downtown problems). Unlike the case for our earlier meetings at N2H2, we won't need to be escorted from the elevators to an upper floor. In addition, the N2H2 folks can supply a laptop with ricochet modem and data projector, which is technology that we can put to very good use. Furthermore, this location will undoubtedly increase our attendance from the sharp and colorful pool of N2H2 Perl programmers, whom we might as well get to know better, since they seem set on a mission of assimilating all (contractually-) free SPUGsters anyway! THE NOT-SO-GOOD NEWS: The exterior doors of the building lock at a certain time, perhaps before our meeting time (still checking on this), so some folks might need to wait a bit until those inside can be summoned buy cell-phones to let them in. Also, parking won't be as convenient or inexpensive as it was at the Hutch, but those are the breaks! That's the news! SPUG is now set to endure into the next millennium! *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From info at inexchange.net Tue Dec 7 19:50:27 1999 From: info at inexchange.net (Info Desk) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Special Webhosting and Dedicated Server Offer Message-ID: <19991208015027571.BYQQ130@infomail.inexchange.net@outbox.infowatch.net> If you wish to be excluded from any future mailings, reply with "remove" in the subject header. ------------------------------------------------------------ http://www.inexchange.net Internet Exchange would like to introduce our Special Hosting and Dedicated Server Plans * Budget Plans from $14.95 Mo. * E-commerce Plans from $49.95 Mo. * Dedicated Server Plan from $99.00 Mo. (Ask about YOUR FREE Server!) * Sign up for 6 months, and we'll WAIVE the setup fee * Sign up for 10 months, and we'll WAIVE the setup fee and give you 2 FREE months * Sign up for 12 months, and we'll give you a FULL FREE 2nd year of hosting * UNLIMITED E-mail, E-mail forwarding, auto responders and vacation reply * FREE registration of your domain with over 950 search engines * Multiple, Redundant, High-Speed connections to the web * INTERNATIONAL Hosting * Access to your account anytime from your own browser * Full Microsoft Front Page support * Unlimited FTP updates * Personal CGI directory for your own scripts (or use ours) * Comprehensive statistics program shows you everything * Domain name registration (www.yourname.com) * Friendly customer support * Additional plans also available If for any reason you are not satisfied with InfoWatch's service after 30 days, we will transfer you back to your original host and pay any transfer fees. http://www.inexchange.net info@inexchange.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Wed Dec 8 19:52:13 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Special Webhosting and Dedicated Server Offer In-Reply-To: <19991208015027571.BYQQ130@infomail.inexchange.net@outbox.infowatch.net>; from info@inexchange.net on Tue, Dec 07, 1999 at 08:50:27PM -0500 References: <19991208015027571.BYQQ130@infomail.inexchange.net@outbox.infowatch.net> Message-ID: <19991208175213.A7730@timji.consultix.wa.com> Well, I was wondering how long it would take for Spammers to start attacking our list, and now it has finally happened. Accordingly, I will be modifying the posting rules so that only list subscribers will be able to post. This might require some people to change their habits, because if joe@hotmail.com is the registered recipient of list mail, but he typically posts from an account associated with the address joe@some-company.com, future postings from that account will soon be disallowed. Please adjust your habits accordingly! -Tim ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== On Tue, Dec 07, 1999 at 08:50:27PM -0500, Info Desk wrote: > If you wish to be excluded from any future mailings, > reply with "remove" in the subject header. > ------------------------------------------------------------ > > http://www.inexchange.net > > Internet Exchange would like to introduce our Special Hosting and Dedicated Server Plans > > * Budget Plans from $14.95 Mo. > * E-commerce Plans from $49.95 Mo. > * Dedicated Server Plan from $99.00 Mo. (Ask about YOUR FREE Server!) > > * Sign up for 6 months, and we'll WAIVE the setup fee > * Sign up for 10 months, and we'll WAIVE the setup fee and give you 2 FREE months > * Sign up for 12 months, and we'll give you a FULL FREE 2nd year of hosting > * UNLIMITED E-mail, E-mail forwarding, auto responders and vacation reply > * FREE registration of your domain with over 950 search engines > * Multiple, Redundant, High-Speed connections to the web > * INTERNATIONAL Hosting > * Access to your account anytime from your own browser > * Full Microsoft Front Page support > * Unlimited FTP updates > * Personal CGI directory for your own scripts (or use ours) > * Comprehensive statistics program shows you everything > * Domain name registration (www.yourname.com) > * Friendly customer support > * Additional plans also available > > If for any reason you are not satisfied with InfoWatch's service after 30 days, we will transfer you back to your original host and pay any transfer fees. > > http://www.inexchange.net > info@inexchange.net > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > -- *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mmertel at ix.netcom.com Mon Dec 13 18:03:52 1999 From: mmertel at ix.netcom.com (Mark Mertel) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: PERL - CORBA = COPE Message-ID: <99121316075300.00734@mmertel3> all, i've got a perl/cgi-bin application which is going to need to interface with some CORBA services in the near future. is COPE a good solution for this ? i'd like to hear of any real-life experiences with COPE in a prodution environment. thanks mmertel@ix.netcom.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Mon Dec 13 20:02:25 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Need Perl Instructors Message-ID: <19991213180225.A24783@timji.consultix.wa.com> Any of you free-lance types out there who aren't already on my list of wannabee Perl instructors, who wanna become listed wannabees, let me know! (Geezh; that was too obtuse even for me to fathom 8-} Trying again.) Anybody who knows Perl pretty well, who finds lecturing for 7-8 hours a day enjoyable, who can relate comfortably to strange human beings for long periods without pissing them off, who has some fairly recent experience in technical training (or justifiable reason to believe in aptitude for same), and who has an (un)employment situation that permits occasional week-long forays into the Heartland of America, please get in touch with me. Now! 8-} (Seriously, I'm looking to add a few more names to my "list" this very evening, 12/13). *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Mon Dec 13 20:55:29 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Testing Message-ID: <19991213185529.A24940@timji.consultix.wa.com> Mon Dec 13 18:55:29 PST 1999 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ryan at erwin.org Thu Dec 16 23:57:29 1999 From: ryan at erwin.org (Ryan Erwin) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: E-spug takers? Message-ID: <001a01bf4853$9eaa2760$470b91d8@5k.monroe.net> Greetings from the self proclaimed E-spug emperor. ;) Of course, my value as emperor of E-spug increases a little bit if there are still any people who would be interested in attending a East Side SPUG meeting. If there are any objections to my self proclaimed emperorship, feel free to impeach me. Otherwise, just let me know if you would be interested in attending a East Side group. So, how many of you would show up, as speakers or audience members, for a SPUG meeting on the East Side, if I go through the trouble of scheduling them? Thanks- Ryan Erwin [ryan@erwin.org] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From stuart_poulin at yahoo.com Fri Dec 17 15:37:25 1999 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: E-spug takers? Message-ID: <19991217213725.25554.qmail@web122.yahoomail.com> print "I'll be there" if $day !~ /^Tue/i; There's got to be some clever way to say $Emperor = new clothes; but I can't think of it. --- Ryan Erwin wrote: > Greetings from the self proclaimed E-spug emperor. ;) > > Of course, my value as emperor of E-spug increases a little bit > if there are still any people who would be interested in > attending a East Side SPUG meeting. > > If there are any objections to my self proclaimed emperorship, > feel free to impeach me. Otherwise, just let me know if you > would be interested in attending a East Side group. > > So, how many of you would show up, as speakers or audience > members, for a SPUG meeting on the East Side, if I go through the > trouble of scheduling them? > > Thanks- > > Ryan Erwin [ryan@erwin.org] > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > > __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one place. Yahoo! Shopping: http://shopping.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From cmeyer at zipcon.net Fri Dec 17 18:19:54 1999 From: cmeyer at zipcon.net (Colin Meyer) Date: Wed Aug 4 00:09:41 2004 Subject: Emperor [SPUG: E-spug takers?] In-Reply-To: <19991217213725.25554.qmail@web122.yahoomail.com>; from Stuart Poulin on Fri, Dec 17, 1999 at 01:37:25PM -0800 References: <19991217213725.25554.qmail@web122.yahoomail.com> Message-ID: <19991217161954.B3558@sim.zipcon.net> On Fri, Dec 17, 1999 at 01:37:25PM -0800, Stuart Poulin wrote: > print "I'll be there" if $day !~ /^Tue/i; > > There's got to be some clever way to say $Emperor = new clothes; but I can't > think of it. > I think that it is more of a "has-a" rather than an "is-a" relationship: $emp = new Sovereign; $naught = new Clothes; $naught->composed_of(undef); $naught->looks_like('invisible'); $emp->dress_in($naught); print $emp->dressed_in->looks_like(); Where looks_like() and composed_of() are accessor methods for attributes of object class Clothes and dress_in()/dressed_in() are set/get methods for an attribute of class Sovereign. It is probably confusing to use two different object attribute accessing interfraces in the same segment of code, but you can do that in Perl. In fact you have to use arbitrarily different object interfaces when combining the usage of several random modules from CPAN in one program... -C. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From stuart_poulin at yahoo.com Fri Dec 17 19:40:23 1999 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:09:41 2004 Subject: Emperor [SPUG: E-spug takers?] Message-ID: <19991218014023.15925.qmail@web116.yahoomail.com> --- Colin Meyer wrote: > On Fri, Dec 17, 1999 at 01:37:25PM -0800, Stuart Poulin wrote: > > print "I'll be there" if $day !~ /^Tue/i; > > > > There's got to be some clever way to say $Emperor = new clothes; but I > can't > > think of it. > > > > I think that it is more of a "has-a" rather than an "is-a" relationship: > > $emp = new Sovereign; > > $naught = new Clothes; > $naught->composed_of(undef); > $naught->looks_like('invisible'); > > $emp->dress_in($naught); > > print $emp->dressed_in->looks_like(); > > Where looks_like() and composed_of() are accessor methods for attributes of > object class Clothes and dress_in()/dressed_in() are set/get methods for an > attribute of class Sovereign. > > It is probably confusing to use two different object attribute accessing > interfraces in the same segment of code, but you can do that in Perl. In > fact > you have to use arbitrarily different object interfaces when combining the > usage of several random modules from CPAN in one program... > > -C. > > Well I knew it had to be some kind of aggregation or composition, but it just didn't seem poetic enough. But you've given me an idea - Perl doesn't care what you call your constructors: package Sovereign; sub Ruler { my $class = shift; bless {}, $class; } sub new { my $self=shift; } sub clothes { my $self=shift; return ""; } package main; my $emperor = Ruler Sovereign; print $emperor->new->clothes; __END__ Ooops - did I give away the story? __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one place. Yahoo! Shopping: http://shopping.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Mon Dec 20 13:10:34 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: December Meeting: Cooking with REs Message-ID: <19991220111034.A13221@timji.consultix.wa.com> SPUG-sters, Here's a reminder about tomorrow's meeting, which will be our last one at the "Hutch" (aka Fred's Cancer Center) , at the South end of lake Union (location details on our web site). * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * SPUG, the Seattle Perl Users Group, will meet on December 21st (3rd Tuesday) from 7-9pm, in the Thomas Bldg. of the Fred Hutchinson Cancer Research Center's S. Lake Union campus, 1100 Fairview Ave. N. Dean Hudson of the Esoteric Research Organization will lead a discussion on the "Pattern Matching" chapter of the O'Reilly "Perl Cookbook". Admission is free, and open to the general public. Attendees are strongly encouraged to read the chapter first, and bring questions. For more information, including driving directions, see http://www.halcyon.com/spug/, send Email to spug@halcyon.com, or call Tim Maher, (206) 781-UNIX. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ajalis at beryllium.cobaltgroup.com Mon Dec 20 16:41:43 1999 From: ajalis at beryllium.cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: CGI Hosting Message-ID: <199912202241.OAA13727@beryllium.cobaltgroup.com> FYI www.tripod.com is now offering free Perl script hosting. This is neat because most free web sites don't allow user scripts. Tripod puts a banner ad on your output and there are some restrictions on the scripts. But free is still a pretty good deal. Does anyone here know of any other websites which offer free CGI hosting? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From andy at n2h2.com Tue Dec 21 10:33:36 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Embedding Perl BOF Message-ID: Will there be anyone going to SPUG tonight interested in chatting (after the main meeting) about embedding perl (libperl) in arbitrary C programs? Relevant documents: perlembed, perlguts, perlcall, Config.pm, ExtUtils::Embed.pm, and for extra credit: perlxs, perlxstut. -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 Advanced Technologies | Seattle WA 98164-1059 Development | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Dec 23 20:26:58 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Consulting Co. needs Perl Programmer Message-ID: <19991223182658.A25262@timji.consultix.wa.com> Hello SPUG Members, I'm looking for a strong Perl programmer who is available to interview and start work ASAP. This is a permanent position and it pays 40 to 60K per year plus benefits. This is W2 employment only. The job location is in the Eastside, Redmond/Bellevue area. I've got several projects where I can use your skills as this is a career consulting position. Please mail me your resumes or let me know how best I can reach you. Having experience with spiders is a real big plus. Dante Haddad BEST CONSULTING 11255 Kirkland Way, Kirkland WA 98033 Main: (425) 814-8104, Fax: (425) 814-8108 Direct: (425) 202-8659, Toll Free: (888) 878-1888 Ext. 8659 Email: dante@bestnet.com Web Address: www.bestnet.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Sat Dec 25 18:48:13 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Christmas Benchmarks! Message-ID: <19991225164813.A2390@timji.consultix.wa.com> Merry Christmas, SPUG-sters! Hope everybody is having a wonderful holiday! My favorite activity is Perl Programming, so I've spent the day trying to get to the bottom of a vexing "RE Efficiency Question." Specifically, in Jeffrey Friedl's "Mastering Regular Expressions" book, he identifies many common programming practices (/i, $&, etc.) that reportedly incur a performance penalty (although he doesn't report any quantitative data). However, he did his research in 1995-1996 for his 1997 book, and anybody who's been reading the Changes files distributed with Perl since 1998 knows there have been many fixes applied in recent years to address the performance problems Friedl identified. People still quote Friedl about the imprudence of using the $& variable, as evidenced at our own meeting last week, but as I can tell you from much Christmas experience today, it's not easy any more to find examples of code fragments that do the same job with substantially different run times, even when using tests like these with huge target strings (to maximize the "string copying penalty"): $start=(times)[0]; while (lots) { /match/; $copy=$&; vs. /(match)/; $copy=$1; /another_match/ # because $& is supposed to slow down all matches, # but $1 just the particular one /yet_another_match/ } $delta=(times)[0] - $start; (Friedl (1997) warned that Benchmark is $& polluted already, and therefore incapable of detecting speed difference in its use or disuse, so I've used my own timing routines; but as far as I can tell, Benchmark.pm is "clean" now anyway!) AND while (lots) { /match/; $after=$'; vs. /match(.*)/; $after=$1; /another_match/ /yet_another_match/ . . . I've exchanged some Email with Jeffrey today (he spends Christmas like I do 8-} ) and he tells me that his (considerable) knowledge of Perl RE efficiency peaked in 1996, and he hasn't kept up with the latest Perl improvements. He also said he has heard "rumors" about the /i penalty being removed, etc., but that he doesn't really know what's happened. I'm supposed to be an expert on RE Efficiency, at least by the next time my "Advanced Pattern Matching" class rolls around in January, so I'd be grateful if somebody could show me some good benchmark programs that actually show a real difference (>15%) in the speed of different RE coding techniques, using the latest Perl version (5.00503). Thanks, and Merry Christmas! *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Sat Dec 25 18:57:58 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Text::Balanced broken! Message-ID: <19991225165758.A2498@timji.consultix.wa.com> SPUGsters, In other Christmas news, I've found what seems to be a bug in Damian Conway's Text::Balanced::extract_tagged() function. Although it's supposed to handle all HTML/XML tags, the internal RE it uses to construct the closing tag for the given opening tag doesn't allow digits, so if you tell it to match

text, it looks for a closing tag of , which it obviously won't find. Also, I sure wish he'd show some realistic examples of the $prefix argument in his documentation; it took me quite a while to figure out the that I needed '(?s).*?(?=

)' to skip any characters leading up to the next tag! Apparently Damian has a peculiar was of spending Christmas, because I haven't been able to get a reply from him via Email today. 8-} *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Sun Dec 26 14:02:13 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Awful Recipes in Cookbook Message-ID: <19991226120213.A5295@timji.consultix.wa.com> SPUGsters, The closer I look at the Perl Cookbook, the less I like it. (But I've got the first printing, for which many errata have never been officially identified or corrected.) In particular, page 172, which shows a "general construct" for finding the last (rightmost) match for a pattern. In my edition, the formula is shown as A(?!.*A)*$, which definitely isn't right. Then in their /x-expansion of that same formula, in the next paragraph, they show A(?!.*A)$ (no asterisk before the $), which requires the initial A to be at the end of the line! Still not right. Finally, in the real code example, they use A(?!.*A), which actually works, but still without a decent explanation. I'm developing some new lookahead/lookbehind examples for my "Advanced Pattern Matching" course, and finding that the Cookbook has the most detailed and interesting coverage - but there are no real explanations, and as I've indicated the examples are chock full of errors. I'm especially interested in explanations of examples that trick the regex engine into "scanning forward" by matching text repeatedly within non-capturing parentheses, of the basic form A((?:(?!A).)*) (which, having matched the initial A, apparently advances one character at a time ensuring that none of the following sequences matches an A). Does anybody know of any decent documentation on how lookahead/lookbehind work in Perl, or any practical examples? The Perl FAQs, perlre man page, Cookbook, Mastering Regular Expressions, Camel, and Effective Perl Programming generally give very simplistic examples and explanations, or none at all. As a course developer, I'm not unaccustomed to being the first to really try to explain how something works, but when there's hidden "magic" involved (as with A((?:(?!A).)*)), I could use some help in figuring out what's going on! Has anybody actually found good uses for lookbehind? The Perl implementation seems so limited as to be nearly worthless to me, but maybe I'm missing something. *==================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes: 12/13 Perl; 12/17 Adv. Pattern Matching; 1/18 Int. Perl | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From anthonyc at blarg.net Wed Dec 29 20:33:47 1999 From: anthonyc at blarg.net (Anthony Christopher) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Out of sorts with sort Message-ID: <386AC48B.99F43E8B@blarg.net> I have a hash that looks a lot like the hash in my example below. My goal is to sort the keys of the hash based on the values of 'i 1' so I can do some processing in that particular order. The commented lines indicate my best guesses as to how to do what I want, but they don't work :-{ Is there a simple way to do this with sort or do I have to write my own sort routine? #!/usr/local/bin/perl -w my %hash = ( 'keya' => { 'i 1' => 4 , 'i 2' => 1 }, 'keyb' => { 'i 1' => 2 , 'i 2' => 2 }, 'keyc' => { 'i 1' => 3 , 'i 2' => 1 }, 'keyd' => { 'i 1' => 1 , 'i 2' => 2 } ); my @mykeys = keys %hash; print join(',',@mykeys),"\n"; #my @sortedkeys = sort { $a->{'i 1'} <=> $b->{'i 1'} } @mykeys; #my @sortedkeys = sort { $a{'i 1'} <=> $b{'i 1'} } @mykeys; print join(',',@sortedkeys),"\n"; TIA Anthony - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From sab at rresearch.com Wed Dec 29 20:42:33 1999 From: sab at rresearch.com (Scott Blachowicz) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Out of sorts with sort In-Reply-To: <386AC48B.99F43E8B@blarg.net>; from Anthony Christopher on Wed, Dec 29, 1999 at 06:33:47PM -0800 References: <386AC48B.99F43E8B@blarg.net> Message-ID: <19991229184233.A87754@sabami.seaslug.org> On Wed, Dec 29, 1999 at 06:33:47PM -0800, Anthony Christopher wrote: > #!/usr/local/bin/perl -w > my %hash = ( > 'keya' => { 'i 1' => 4 , 'i 2' => 1 }, > 'keyb' => { 'i 1' => 2 , 'i 2' => 2 }, > 'keyc' => { 'i 1' => 3 , 'i 2' => 1 }, > 'keyd' => { 'i 1' => 1 , 'i 2' => 2 } > ); > my @mykeys = keys %hash; > print join(',',@mykeys),"\n"; > #my @sortedkeys = sort { $a->{'i 1'} <=> $b->{'i 1'} } @mykeys; > #my @sortedkeys = sort { $a{'i 1'} <=> $b{'i 1'} } @mykeys; > print join(',',@sortedkeys),"\n"; How about something more like: my @sortedkeys = sort { $hash{$a}->{'i 1'} <=> $hash{$b}->{'i 1'} } @mykeys; In other words...you forgot that $a & $b are keys into %hash... Scott - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From debert at dusya.osd.com Thu Dec 30 10:26:53 1999 From: debert at dusya.osd.com (Daniel V. Ebert) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: File dates Message-ID: <9912301626.AA06109@dusya.osd.com> I have used the stats FILEHANDLE command to extract the "last modified" time of a file. ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat FILEHANDLE; This returns the time in a numrical format: 946568470 I'm guessing that this is the number of seconds since the epoch ... is there an easy way to translate that into a calendar date? Or is there a different command that would return the modify time in a different format? Thanks in advance, --- Dan Ebert Seanet Internet Services - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From jimfl at colltech.com Thu Dec 30 11:24:51 1999 From: jimfl at colltech.com (jimfl) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: File dates In-Reply-To: <9912301626.AA06109@dusya.osd.com> Message-ID: <132642.3155534691@erdos.nwest.attws.com> --On Thursday, December 30, 1999 8:26 AM -0800 "Daniel V. Ebert" wrote: > > I have used the stats FILEHANDLE command to extract the "last > modified" time of a file. > > ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, > $mtime, $ctime, $blksize, $blocks) = stat FILEHANDLE; > > This returns the time in a numrical format: 946568470 > I'm guessing that this is the number of seconds since the epoch ... > is there an easy way to translate that into a calendar date? Or > is there a different command that would return the modify time in > a different format? You can get a string representation of the time with scalar localtime($mtime) or you can get the individual elements ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($mtime); -- Jim Flanagan Collective Technologies jimfl@colltech.com http://www.colltech.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From panache at wolfenet.com Thu Dec 30 12:08:02 1999 From: panache at wolfenet.com (David Poncelow) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: File dates In-Reply-To: <9912301626.AA06109@dusya.osd.com> Message-ID: Quite a simple solution, actually. The builtin function localtime($date) will return an array containing all of the requisite information for the date (month, day of month, etc.) If used in a scalar context (i.e. scalar(localtime($time)) ) it will return a nicely formatted date string, which it sounds like is what you want. On Thu, 30 Dec 1999, Daniel V. Ebert wrote: > > I have used the stats FILEHANDLE command to extract the "last modified" time > of a file. > > ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, > $ctime, $blksize, $blocks) = stat FILEHANDLE; > > This returns the time in a numrical format: 946568470 > I'm guessing that this is the number of seconds since the epoch ... is there > an easy way to translate that into a calendar date? Or is there a different > command that would return the modify time in a different format? > > Thanks in advance, > > --- > Dan Ebert > Seanet Internet Services > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mcglk at serv.net Thu Dec 30 12:22:27 1999 From: mcglk at serv.net (Ken McGlothlen) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: File dates In-Reply-To: "Daniel V. Ebert"'s message of "Thu, 30 Dec 99 08:26:53 -0800" References: <9912301626.AA06109@dusya.osd.com> Message-ID: <877lhwl258.fsf@ralf.serv.net> "Daniel V. Ebert" writes: | ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, | $ctime, $blksize, $blocks) = stat FILEHANDLE; | | This returns the time in a numrical format: 946568470 | I'm guessing that this is the number of seconds since the epoch ... is there | an easy way to translate that into a calendar date? Or is there a different | command that would return the modify time in a different format? Fortunately yes. First, there's always localtime. You can call this in three ways: ($sc, $mn, $hr, $md, $mo, $yr, $wd, $yd, $dst) = localtime( $mtime ); returns (in order) seconds, minutes, hours, day of month, month (from 0), year (offset from 1900), weekday (0 through 6), day of year (from 0), and a boolean telling you if DST is on or not. Alternatively, you could do: $now = localtime( $mtime ); and $now will be "Thu Dec 30 10:21:53 1999" (a la ctime(3)). There's also a gmttime() function that does the same thing, only in GMT. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From schieb at cobaltgroup.com Thu Dec 30 12:35:15 1999 From: schieb at cobaltgroup.com (Brian Schieber) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: MakeMaker question, if you will... In-Reply-To: <9912301626.AA06109@dusya.osd.com> from "Daniel V. Ebert" at Dec 30, 99 08:26:53 am Message-ID: <199912301835.KAA31358@beryllium.cobaltgroup.com> A non-text attachment was scrubbed... Name: not available Type: text Size: 1554 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/19991230/7786282e/attachment.bat From lou at visca.com Thu Dec 30 13:04:50 1999 From: lou at visca.com (Lou Hevly) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: File dates In-Reply-To: <9912301626.AA06109@dusya.osd.com> Message-ID: <3.0.6.32.19991230200450.007e4330@visca.com> At 08:26 30/12/99 -0800, Daniel V. Ebert wrote: > >I have used the stats FILEHANDLE command to extract the "last modified" time >of a file. > >($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, >$ctime, $blksize, $blocks) = stat FILEHANDLE; > >This returns the time in a numrical format: 946568470 >I'm guessing that this is the number of seconds since the epoch No need to guess: perldoc -f stat ... 9 mtime last modify time since the epoch > ... is there >an easy way to translate that into a calendar date? Or is there a different >command that would return the modify time in a different format? Here's one way: #!/usr/bin/perl -w use strict; my $file = '/path/to/file'; open F, $file or die $!; my $mtime = (stat F)[9]; close F or warn $!; my $last_mod = localtime($mtime); print "$last_mod\n"; If you want to play with the formating, you can use the 'strftime' function from the POSIX module: #!/usr/bin/perl -w use strict; use POSIX; ...(same as above)... my $last_mod = strftime "%A, %B %d, %Y", localtime($mtime); print "$last_mod\n"; Lou Hevly lou@visca.com http://www.visca.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From otter101 at hotmail.com Thu Dec 30 17:01:51 1999 From: otter101 at hotmail.com (Steve Laybourn) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Dates, anyone? Message-ID: <19991230230151.95140.qmail@hotmail.com> Hello! I'm just a bit late with this posting, which I found out went to the wrong place the first time I posted it. Here's a way I deal with changing a UNIX time into a valid time/date stamp: @statz=stat("wossname.pl"); # or whatever file $mz="Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec"; $wkd="Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday"; ($sec,$min,$hour,$day,$nmon,$year,$wday,$yday,$isdst)=localtime($statz[9]); if ($year<80) { $year+=2000; } else { $year+=1900; } $wk=(split("/",$wkd))[$wday]; $mn=(split("/",$mz))[$nmon]; $lastmod=sprintf("%s, %s-%s-%s %02d:%02d:%02d PDT",$wk,$day,$mn,$year,$hour,$min,$sec); This turns a large number of seconds into something like: Thursday, 30-Dec-1999 14:59:43 PDT I know this is probably not the best way to do this, but you don't have to refer to any external modules and you can customize the subroutine to output the date in any format you like... Hope this helps! Steve Laybourn The answer to your question REALLY is: Five tons of flax! ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From panache at wolfenet.com Thu Dec 30 18:26:57 1999 From: panache at wolfenet.com (David Poncelow) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Dates, anyone? In-Reply-To: <19991230230151.95140.qmail@hotmail.com> Message-ID: Actually, in being too careful, you will find that you introduced a Y2K bug into your script- as the Camel says, 'the year has had 1,900 subtracted from it'. As of Jan 1 (tomorrow night), that array element will be 100, not the 00 that you are counting on. As a result, your date string will end up being Saturday, 1-Jan-2100 14:59:43 PDT... On Thu, 30 Dec 1999, Steve Laybourn wrote: > Hello! > > I'm just a bit late with this posting, which I found out went to the wrong > place the first time I posted it. > > Here's a way I deal with changing a UNIX time into a valid time/date stamp: > > @statz=stat("wossname.pl"); # or whatever file > $mz="Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec"; > $wkd="Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday"; > ($sec,$min,$hour,$day,$nmon,$year,$wday,$yday,$isdst)=localtime($statz[9]); > if ($year<80) { $year+=2000; } else { $year+=1900; } > $wk=(split("/",$wkd))[$wday]; > $mn=(split("/",$mz))[$nmon]; > $lastmod=sprintf("%s, %s-%s-%s %02d:%02d:%02d > PDT",$wk,$day,$mn,$year,$hour,$min,$sec); > > This turns a large number of seconds into something like: > > Thursday, 30-Dec-1999 14:59:43 PDT > > I know this is probably not the best way to do this, but you don't have to > refer to any external modules and you can customize the subroutine to output > the date in any format you like... > > Hope this helps! > Steve Laybourn > > The answer to your question REALLY is: Five tons of flax! > > > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From sab at rresearch.com Thu Dec 30 18:59:18 1999 From: sab at rresearch.com (Scott Blachowicz) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Dates, anyone? In-Reply-To: ; from David Poncelow on Thu, Dec 30, 1999 at 04:26:57PM -0800 References: <19991230230151.95140.qmail@hotmail.com> Message-ID: <19991230165918.A23976@sabami.seaslug.org> On Thu, Dec 30, 1999 at 04:26:57PM -0800, David Poncelow wrote: > Actually, in being too careful, you will find that you introduced a Y2K > bug into your script- as the Camel says, 'the year has had 1,900 > subtracted from it'. As of Jan 1 (tomorrow night), that array element > will be 100, not the 00 that you are counting on. As a result, your date > string will end up being Saturday, 1-Jan-2100 14:59:43 PDT... Nope...he's adding 1900 if it's not '<80', so 100+1900 = 2000. He's using the "I'm not sure which way it'll go, but this'll cover them both" algorithm :-). (assuming there's no way for this code to get a date that is supposed to be before 1980). > > @statz=stat("wossname.pl"); # or whatever file > > $mz="Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec"; > > $wkd="Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday"; > > ($sec,$min,$hour,$day,$nmon,$year,$wday,$yday,$isdst)=localtime($statz[9]); > > if ($year<80) { $year+=2000; } else { $year+=1900; } -- Scott.Blachowicz@seaslug.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From apond at amazon.com Thu Dec 30 20:48:12 1999 From: apond at amazon.com (ashley) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Dates, anyone? References: <19991230230151.95140.qmail@hotmail.com> Message-ID: <386C196C.167E@amazon.com> my late two cents. though this module is too slow for large data manipulation it rules otherwise: perldoc Date::Manip totally flexible and will allow for many different kinds of input, including strings. i have a nice little script that i'd share but it's work for hire. :) -ashley Steve Laybourn wrote: > > Hello! > > I'm just a bit late with this posting, which I found out went to the wrong > place the first time I posted it. > > Here's a way I deal with changing a UNIX time into a valid time/date stamp: > > @statz=stat("wossname.pl"); # or whatever file > $mz="Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec"; > $wkd="Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday"; > ($sec,$min,$hour,$day,$nmon,$year,$wday,$yday,$isdst)=localtime($statz[9]); > if ($year<80) { $year+=2000; } else { $year+=1900; } > $wk=(split("/",$wkd))[$wday]; > $mn=(split("/",$mz))[$nmon]; > $lastmod=sprintf("%s, %s-%s-%s %02d:%02d:%02d > PDT",$wk,$day,$mn,$year,$hour,$min,$sec); > > This turns a large number of seconds into something like: > > Thursday, 30-Dec-1999 14:59:43 PDT > > I know this is probably not the best way to do this, but you don't have to > refer to any external modules and you can customize the subroutine to output > the date in any format you like... > > Hope this helps! > Steve Laybourn > > The answer to your question REALLY is: Five tons of flax! > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address -- "Never confuse movement with action." --Ernest Hemingway - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From moonbeam at catmanor.com Thu Dec 30 21:20:15 1999 From: moonbeam at catmanor.com (William Julien) Date: Wed Aug 4 00:09:41 2004 Subject: SPUG: Dates, anyone? In-Reply-To: Mail from 'Scott Blachowicz ' dated: Thu, 30 Dec 1999 16:59:18 -0800 Message-ID: <199912310320.TAA24449@catmanor.com> > >Nope...he's adding 1900 if it's not '<80', so 100+1900 = 2000. He's >using the "I'm not sure which way it'll go, but this'll cover them >both" algorithm :-). (assuming there's no way for this code to get a >date that is supposed to be before 1980). > >> > @statz=stat("wossname.pl"); # or whatever file >> > $mz="Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec"; >> > $wkd="Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday"; >> > ($sec,$min,$hour,$day,$nmon,$year,$wday,$yday,$isdst)=localtime($statz[9]); >> > if ($year<80) { $year+=2000; } else { $year+=1900; } tm_year year in the unix time.h "struct tm", is documented as "The number of years since 1900.". So, employing a windowing technique is not necessary. All you have to do is add 1900 to correctly get the correct year. This is a timely question. I think the above really illustrates that the Y2K issue is really a people problem. Before tomorrow, programmers could use the raw scalar result from (localtime($time_t))[5] as the current year; ignoring the definition. I agree with Tom Christiansen's point of view. "Is Perl ``Year 2000 Compliant''? The answer is that Perl is every bit as Y2K compliant as is your pencil; no more, and no less." see ... http://www.perl.org/phbs/y2k.html --- _,'| _.-''``-...___..--'; /, \'. _..-' , ,--...--''' < \ .`--''' ` /| William Julien moonbeam@catmanor.com `-,;' ; ; ; http://www.catmanor.com/moonbeam/ __...--'' __...--_..' .;.' vi is my shepherd; i shall not font. (,__....----''' (,..--'' perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address