From james at banshee.com Fri Jul 1 10:53:35 2005 From: james at banshee.com (James Moore) Date: Fri, 1 Jul 2005 10:53:35 -0700 Subject: SPUG: Festival speech synthesis and perl Message-ID: <200507011752.j61HqBC6031568@server2.banshee.com> I'm using Festival for some speech synthesis. The modules on CPAN supporting Festival are all years out of date (all of them date from the previous century), and none of them install without modifications. Anyone else using the Festival server from Perl? If so, what are you doing to talk to the server? It's not like it's hard to roll your own, but it seems unlikely that no one else has already done this. I'm surprised by the state of CPAN for this, though. (I suppose I should ask the more general question too - what's the best way to do speech synthesis from perl?) - James From haircut at gmail.com Fri Jul 1 12:18:22 2005 From: haircut at gmail.com (Adam Monsen) Date: Fri, 1 Jul 2005 12:18:22 -0700 Subject: SPUG: system() eating STDIN, how to avoid? In-Reply-To: <200507010247.j612l1qg023931@server2.banshee.com> References: <200507010247.j612l1qg023931@server2.banshee.com> Message-ID: <9ebd651105070112181825afbc@mail.gmail.com> On 6/30/05, James Moore wrote: [...] > Something in the system() call seems to be eating from standard input, > though. [...] I'm unable to reproduce this. I wrote the following script (called stdin_eat.pl): use strict; system('true') == 0 or die; print ; I try the following: $ echo -e "hello world\n" > test.txt $ perl -w stdin_eat.pl < test.txt hello world $ Am I missing something? -- Adam Monsen http://adammonsen.com/ From dvergin at igc.org Fri Jul 1 23:52:35 2005 From: dvergin at igc.org (David Vergin) Date: Fri, 01 Jul 2005 23:52:35 -0700 Subject: SPUG: Festival speech synthesis and perl In-Reply-To: <200507011752.j61HqBC6031568@server2.banshee.com> References: <200507011752.j61HqBC6031568@server2.banshee.com> Message-ID: <42C639B3.50901@igc.org> James Moore wrote: > ...Anyone else using the Festival server from Perl? > If so, what are you doing to talk to the server? open( FESTIVAL, '| /usr/bin/festival --tts' ) or die "\nCan't open pipe to festival: $!\n\n"; print FESTIVAL $text; close FESTIVAL; HTH David From dvergin at igc.org Sat Jul 2 00:07:49 2005 From: dvergin at igc.org (David Vergin) Date: Sat, 02 Jul 2005 00:07:49 -0700 Subject: SPUG: Festival speech synthesis and perl In-Reply-To: <200507011752.j61HqBC6031568@server2.banshee.com> References: <200507011752.j61HqBC6031568@server2.banshee.com> Message-ID: <42C63D45.20407@igc.org> James Moore wrote: > ...using the Festival server from Perl? If so, what are you doing to talk > to the server? This example talks to Festival in scheme. The scheme bit could, of course be more extended. Note the change from '--tts' to '--pipe' on the pipe to /usr/bin/festival as compared to the simpler example I posted a few minutes ago. my @voices = qw( voice_rab_diphone voice_don_diphone voice_kal_diphone voice_ked_diphone ); my $voice = $voices[ rand @voices ]; my $text = 'Some text'; open( FESTIVAL, '| /usr/bin/festival --pipe' ) or die "\nCan't open pipe to festival: $!\n\n"; print FESTIVAL "($voice) (SayText \"$text.\")\n"; close FESTIVAL; Looking at it now, that print line would probably look a little better as something like (untested): print FESTIVAL qq/($voice) (SayText "$text.")\n/; Regards, David From bcundal at cundal.net Tue Jul 5 17:19:21 2005 From: bcundal at cundal.net (Brett Cundal) Date: Tue, 5 Jul 2005 17:19:21 -0700 Subject: SPUG: Wiki spammed Message-ID: <20050706001920.GA25255@cundal.net> To whomever it may concern... The SPUG wiki has been defaced by spam. I rolled back a couple pages, but I figured there was a better way to do them all at once. Have a nice day. :) -- Brett -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://mail.pm.org/pipermail/spug-list/attachments/20050706/f8eb7cf6/attachment.bin From kmeyer at blarg.net Tue Jul 5 23:59:58 2005 From: kmeyer at blarg.net (Ken Meyer) Date: Tue, 5 Jul 2005 23:59:58 -0700 Subject: SPUG: GSLUG THIS SATURDAY, July 9th -- OSS: What it is and How it is Threatened Message-ID: ############################################### The July 2005, regular meeting of the Greater Seattle Linux Users Group (GSLUG) will be held this Saturday, July 9th, starting promptly at 10:00 AM on the North Seattle Community College campus. ******************************************************** We are confirmed to use room IB 3319. Parking is free on weekends. For directions, please visit the GSLUG monthly meetings web page at: http://www.gslug.org/meeting.html Please feel free to forward this announcement as appropriate. ******************************************************** NOTE: We have been fortunate to be able to put together a meeting of presentations on the subject of what open source is (by Charles Mauch of TacLUG) and several of the legal threats to it, by Steve Reisler (a lawyer who is Elaine Tsiang's husband). These are synergistic presentations on subjects of EXTREME importance to all open source advocates. As always, participants in all other associated user groups are invited. Moreover, the observations, "This subject is too (insert as appropriate) are "inoperative" for this meeting, which will be presented in plain English. Understand what it is that must be defended and why that is necessary -- or run a substantial risk of losing it! We are anticipating a lot of group discussion on these issues. The presentation topics will be: * 10:00 AM - An Open... and Shut Case? How Complacency and the Courts Could Put Tux in the Slammer Steven A. Reisler This subject applies generally to all free and open source software, and not just Linux. I don't mean this to sound apocalyptic, but I sense that many in the community are not aware of certain trends in current litigation that could have very significant effects -- on programmers specifically -- but also on techies in general. I will focus primarily on four legal trends: * Where the SCO/IBM litigation seems to be headed; * What the recent Supreme Court ruling regarding cable internet access portends for the web; * What the recent Supreme Court Grokster ruling means for intellectual creativity; and * Why everyone in the techie community needs to keep their eyes on federal judicial appointments. These are very big topics, so I will paint rather broadly. Steve Reisler's Bio I am not a techie; I am a lawyer and civil/commercial litigator who has practiced for 25 years and who is familiar with techie issues. My CV can be found at: www.sarpllc.com I have the only (to my knowledge) King County law firm running 100% open source software (thank you Elaine!). I spoke at LinuxFest Northwest 2004 regarding "A Legal Lens on the SCO-IBM Litigation". I have chaired several WSBA Continuing Legal Education seminars, mostly on contract litigation and ethics. I am a past member of the Board of Governors of the WSBA, past editor-in-chief of the Washington State Bar News and past Chair of the Washington State Commission on Judicial Conduct. --------------- * 11:15 AM - A Brand GNU World; An introduction to the Free Software Movement. By Charles Mauch This presentation is about the open source community and it's shared history and values. It was created with the new user in mind, and emphasizes things like sharing and ethics. It isn't a technical presentation. I feel that everybody understands the technical reasons for using Free and Open Source Software (FOSS), but that many LUG members are missing-out on some of the philosophy behind the movement. The presentation covers the following topics: * A Short History of Free and Open Source Software * Benefits of Free Software * Some Drawbacks to Free Software * Common Misconceptions * Current Threats [riposte to Steve] * How to Contribute Charles Mauch's Bio Charles Mauch has been working with GNU/Linux and other UNIX platforms for about 12 years. Charles has a background in security systems and in network infrastructure (data and telephony). He has taught courses at local community colleges on Hacking, Computer Security, Computer Forensics, Establishing VPN's, and in combating fraud. He tends to work for School Districts, Hospitals, and other businesses with a humanitarian focus. When left to his own devices, Charles tends to spend his spare time talking to office plants, eating glue from supply cabinet, and attempting to exterminate the weasels who have infested his pencil drawer [perhaps he does stand-up as well!]. Charles has been working on an paper to go along with this presentation which expands on the subjects he will be talking about in more detail. He plans on bringing a limited number of copies, but it will be available online immediately after the meeting for perusal. [Charles has been a driving force and voice of moderation, contributing greatly to the success of TacLUG, our counterpart LUG in Tacoma, as a member, frequent presenter and a past Moderator on its Board.] --------------------------------------------------------------------- The typical GSLUG meeting agenda is as follows: 10:00 AM First Presentation 11:00 AM Break 11:10 AM Key Announcements and (usually) Raffle Quiz 11:15 AM Second Presentation 12:15 PM Break 12:30 PM Raffle prizes giveaway, when available 12:35 PM GSLUG business, including discussion of potential future presentation topics Announcements by attendees Requests for assistance desired during the following Workshop session, including trouble-shooting and help with Linux installation (bring your system). 1:00 PM-ish Formal meeting is adjourned; Workshop and social networking opportunities begin, including: * Installation and trouble-shooting assistance For recommendations on preparations to maximize the probability of a successful outcome, it is recommended that you consult the "What to Bring" topic, way down the page at: http://www.gslug.org/meeting.html * Potential break-out discussions about interest-group activities * Informal PGP key signing * Talking, chatting, blathering, etc, etc. 4:00 PM End of meeting ----------------------------------------------------------------------- GSLUG meetings are held regularly on the second Saturday of the month at 10 AM, currently at North Seattle Community College and USUALLY in room 3319. Meeting announcements are posted to the gslug-announce mail list. To receive reminders for future GSLUG meetings and notice of other GSLUG activities, you are invited to join the list at: http://lists.gslug.org/mailman/listinfo/gslug-announce Directions, agenda, and presenters' bios will also be posted on the GSLUG website, on the home page and at: http://www.gslug.org/meeting.html You are also invited to join the gslug-general discussion list at: http://lists.gslug.org/mailman/listinfo/gslug-general And a new wiki site is at: http://wiki.gslug.org/ -- The GSLUG Crew ------------------------------- 30 ---------------------------- From tim at consultix-inc.com Thu Jul 7 08:16:07 2005 From: tim at consultix-inc.com (Tim Maher) Date: Thu, 7 Jul 2005 08:16:07 -0700 Subject: SPUG: Minimal Perl book: UPDATE Message-ID: <20050707151607.GA24768@jumpy.consultix-inc.com> SPUGsters, Lots of people in this group have made important contributions to my upcoming book, and I know others are curious about its status, so here's the latest update on: "Minimal Perl: for UNIX & Linux people" THE FLYER To help promote the book, we now have an attractive flyer that describes its unique perspective on Perl. It's viewable and available for download at http://minimalperl.com. If you print the pages back-to-back on the same sheet of paper, you can even fold it into three sections to appreciate the ever-popular "tri-fold design"! The flyer also tells people how to get on the book's mailing list (more on this below). If anybody wants a bunch of flyers to hand out at work or at a Users- group meeting, just let me know and I'll be happy to send you a batch of professionally printed ones, by US mail. On a personal note, I've put a huge amount of time and effort into this book, and the reviewers tell me it's a uniquely valuable contribution to the UNIX/Linux/Perl literature, so I'm very keen on letting people know about it--and I'd appreciate any help you can offer in getting the word out! CONFERENCE APPEARANCES I'll be one of the featured authors at OSCON 2005, in Portland, OR during the first week of August, discussing my book and autographing flyers (in lieu of paper books) on 8/3 from 12:20- 1:45 at the Powell Books booth. I'm scheduled to give a tutorial using excerpts from the book at YAPC::Europe during the first week of September, in Portugal. I might also attend Euro::OSCON in mid-October in Amsterdam and give a tutorial there, if things work out. WHEN'S THE BOOK COMING OUT? We expect the E-book (i.e., the electronic edition) to become available in late September or early October, and the paper version to become available in late October or November. HOW WILL I KNOW WHEN THE BOOK BECOMES AVAILABLE? The publisher has set up a mailing list for those who want to be notified when the Ebook and paper editions become available, which you can join by clicking on "Want to Stay in Touch" at the publisher's web site for the book, http://www.manning.com/Maher -Tim ************************************************************ CONSULTIX ON-LINE RESOURCES Minimal Perl book's web site: http://manning.com/Maher General Information: http://www.consultix-inc.com Course Listings: Perl, http://TeachMePerl.com/perllist.html UNIX/Shell, http://TeachMeUnix.com/unixlist.html Instructor Evaluations: http://www.consultix-inc.com/evals.html Course Evaluations: http://www.consultix-inc.com/course_evals.html On-Site Training: http://www.consultix-inc.com/on-site.html -Tim *--------------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Fall, 2005 book: "Minimal Perl for UNIX/Linux People" | | See http://manning.com/Maher for details, and email-notification sign-up | *--------------------------------------------------------------------------* From LMedrano-Zaldivar at ciber.com Thu Jul 7 09:08:21 2005 From: LMedrano-Zaldivar at ciber.com (Medrano-Zaldivar, L E) Date: Thu, 7 Jul 2005 10:08:21 -0600 Subject: SPUG: Regular Expression Message-ID: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> List, I want to master "Regular Expression" on perl but I would like to know where I can find the most complete documentation. I really appreciate all your help. Thanks, Luis From aaron at activox.com Thu Jul 7 09:32:58 2005 From: aaron at activox.com (aaron salo) Date: Thu, 07 Jul 2005 09:32:58 -0700 Subject: SPUG: Regular Expression In-Reply-To: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> References: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> Message-ID: <42CD593A.5080708@activox.com> Ironically, there is an O'Reilly book that seems well suited for this purpose called... *wait for it*... Mastering Regular Expressions, by Jeff Friedl ISBN 0596002890 Medrano-Zaldivar, L E wrote: >List, > >I want to master "Regular Expression" on perl but I would like to know where I can find the most complete documentation. > >I really appreciate all your help. > >Thanks, >Luis >_____________________________________________________________ >Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org >SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > > > > > From dha at panix.com Thu Jul 7 10:04:15 2005 From: dha at panix.com (David H. Adler) Date: Thu, 7 Jul 2005 13:04:15 -0400 Subject: SPUG: Regular Expression In-Reply-To: <42CD593A.5080708@activox.com> References: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> <42CD593A.5080708@activox.com> Message-ID: <20050707170415.GB3116@panix.com> On Thu, Jul 07, 2005 at 09:32:58AM -0700, aaron salo wrote: > Ironically, there is an O'Reilly book that seems well suited for this > purpose called... > > *wait for it*... > > Mastering Regular Expressions, by Jeff Friedl > > ISBN 0596002890 Note that that's the second edition, which is the one you should get. I doubt there will ever be a more exhaustive treatment of the subject. Jeff's a pretty exhausting guy. But in a good way! ;-) dha -- David H. Adler - - http://www.panix.com/~dha/ no pretense intended ensuring absurd discourse is priority - Haiku by Mark Rogaski From cos at indeterminate.net Thu Jul 7 11:13:35 2005 From: cos at indeterminate.net (John Costello) Date: Thu, 7 Jul 2005 11:13:35 -0700 (PDT) Subject: SPUG: Regular Expression In-Reply-To: <42CD593A.5080708@activox.com> Message-ID: On Thu, 7 Jul 2005, aaron salo wrote: > Ironically, there is an O'Reilly book that seems well suited for this > purpose called... > *wait for it*... > > Mastering Regular Expressions, by Jeff Friedl > > ISBN 0596002890 > > Medrano-Zaldivar, L E wrote: > > >List, > > > >I want to master "Regular Expression" on perl but I would like to know where I can find the most complete documentation. > > > >I really appreciate all your help. > > > >Thanks, > >Luis If you are in the Seattle area, Seattle Public Library has two copies for check out (though both currently are checked out). King County Library appears not to have the book. John ----- John Costello - cos at indeterminate dot net From aaron at activox.com Thu Jul 7 11:46:17 2005 From: aaron at activox.com (aaron salo) Date: Thu, 07 Jul 2005 11:46:17 -0700 Subject: SPUG: Regular Expression In-Reply-To: References: Message-ID: <42CD7879.8060606@activox.com> John Costello wrote: >If you are in the Seattle area, Seattle Public Library has two copies >for check out (though both currently are checked out). > They should send someone to the homes of the borrowers to make sure they are not head-butting walls in a fugue state. The book is unquestionably the authoritative work on the subject, and unlikely ever to be equalled, but has the power to destroy strong minds. I suggest a twenty page per day limit, and never operate heavy machinery while under the influence of Mr. Friedl. ~!a From charles.e.derykus at boeing.com Thu Jul 7 12:04:17 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Thu, 7 Jul 2005 12:04:17 -0700 Subject: SPUG: Regular Expression Message-ID: I've experienced the "fugue" state you mention ... Although I have the 1st edition, I limit my time with the 2nd ed. to 10 minute forays at the University Book Store :). As I recall there's a good explanation of the (?{ code }) construct among other things. Definitely a good buy (er, borrow)... -- Charles DeRykus -----Original Message----- From: aaron salo [mailto:aaron at activox.com] Sent: Thursday, July 07, 2005 11:46 AM To: spug-list at pm.org Subject: Re: SPUG: Regular Expression John Costello wrote: >If you are in the Seattle area, Seattle Public Library has two copies >for check out (though both currently are checked out). > They should send someone to the homes of the borrowers to make sure they are not head-butting walls in a fugue state. The book is unquestionably the authoritative work on the subject, and unlikely ever to be equalled, but has the power to destroy strong minds. I suggest a twenty page per day limit, and never operate heavy machinery while under the influence of Mr. Friedl. ~!a _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med WEB PAGE: http://seattleperl.org/ From bill at celestial.com Thu Jul 7 12:08:20 2005 From: bill at celestial.com (Bill Campbell) Date: Thu, 7 Jul 2005 12:08:20 -0700 Subject: SPUG: Regular Expression In-Reply-To: <42CD7879.8060606@activox.com> References: <42CD7879.8060606@activox.com> Message-ID: <20050707190820.GA21354@alexis.mi.celestial.com> On Thu, Jul 07, 2005, aaron salo wrote: >John Costello wrote: > >>If you are in the Seattle area, Seattle Public Library has two copies >>for check out (though both currently are checked out). >> >They should send someone to the homes of the borrowers to make sure they >are not head-butting walls in a fugue state. The book is unquestionably the >authoritative work on the subject, and unlikely ever to be equalled, but >has the power to destroy strong minds. I suggest a twenty page per day >limit, and never operate heavy machinery while under the influence of Mr. >Friedl. Another book that's well worth reading is ``Unix Text Processing'' by Dale Dogherty and Tim O'Reilly. It has excellent information on many *nix utilities including about the only thing I ever understood on using the advanced features of ``sed'' (which I didn't need much after learning perl :-). There's a pretty good section on regular expressions in the chapter on ``vi''. Perl regular expressions have a fair number of extensions since this was written (e.g. \d as shorthand for the digits [0-9], etc.), but I still found this helpful. This book is available for free download from O'Reilly. Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ There is no distinctly native American criminal class save Congress -- Mark Twain From billy at idiom.com Thu Jul 7 13:08:34 2005 From: billy at idiom.com (William T) Date: Thu, 7 Jul 2005 13:08:34 -0700 Subject: SPUG: Regular Expression In-Reply-To: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> References: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> Message-ID: <20050707200834.GA31979@idiom.com> On Thu, Jul 07, 2005 at 10:08:21AM -0600, Medrano-Zaldivar, L E wrote: > I want to master "Regular Expression" on perl but I would like to know where I can find the most complete documentation. I've only every used 'perldoc perlre'. It is a reference and a bit terse, but I don't think that I've ever needed to look elsewhere. -wjt From aaron at activox.com Thu Jul 7 13:38:37 2005 From: aaron at activox.com (aaron salo) Date: Thu, 07 Jul 2005 13:38:37 -0700 Subject: SPUG: Regular Expression In-Reply-To: <20050707200834.GA31979@idiom.com> References: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> <20050707200834.GA31979@idiom.com> Message-ID: <42CD92CD.9020703@activox.com> William T wrote: >I've only every used 'perldoc perlre'. It is a reference and a bit terse, but I >don't think that I've ever needed to look elsewhere. > > And just to address any lurkers who may be at the completely opposite end of the spectrum from the core Friedl demographic, if you're just starting to get your feet wet in this stuff I can highly recommend *ahem* Perl for Dummies, by Paul Hoffman, *ISBN:* 0-7645-3750-4. If you are coming to Perl from another so-called language, or just need enough info to get your motor started, this book will get the job done to teach you basic regex, including matching, replacements, etc -- as well as some very clear simple info on other perlish ops, probably enough for you to figure out the rest through experimentation as you travel towards Conwayism. I have handed out dozens of copies of this book to people of various backgrounds over the years and still see the dogeared copies on their bookshelves with legions of sticky notes wedged into the pages. Good simple quick reference. No animals were harmed in making this recommendation. ~!a From dblanchard at gmail.com Thu Jul 7 13:43:01 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Thu, 7 Jul 2005 13:43:01 -0700 Subject: SPUG: Regular Expression In-Reply-To: <42CD92CD.9020703@activox.com> References: <8FFDEE1FC17DFB4BAF050331C185449F40FF91@srv-corp-exmb4.ciber.cbr.inc> <20050707200834.GA31979@idiom.com> <42CD92CD.9020703@activox.com> Message-ID: My favorite online reference is http://www.regular-expressions.info/ which covers more material for more environments than I can fathom. Duane On 7/7/05, aaron salo wrote: > William T wrote: > > >I've only every used 'perldoc perlre'. It is a reference and a bit terse, but I > >don't think that I've ever needed to look elsewhere. > > > > > And just to address any lurkers who may be at the completely opposite > end of the spectrum from the core Friedl demographic, if you're just > starting to get your feet wet in this stuff I can highly recommend > *ahem* Perl for Dummies, by Paul Hoffman, *ISBN:* 0-7645-3750-4. > > If you are coming to Perl from another so-called language, or just need > enough info to get your motor started, this book will get the job done > to teach you basic regex, including matching, replacements, etc -- as > well as some very clear simple info on other perlish ops, probably > enough for you to figure out the rest through experimentation as you > travel towards Conwayism. > > I have handed out dozens of copies of this book to people of various > backgrounds over the years and still see the dogeared copies on their > bookshelves with legions of sticky notes wedged into the pages. Good > simple quick reference. No animals were harmed in making this > recommendation. > > ~!a > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From charles.e.derykus at boeing.com Thu Jul 7 13:51:01 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Thu, 7 Jul 2005 13:51:01 -0700 Subject: SPUG: Regular Expression Message-ID: William T wrote: >I've only every used 'perldoc perlre'. It is a reference and a bit >terse, but I don't think that I've ever needed to look elsewhere. > >... There're are several other good online Perl ref's which are newer and tend to be overlooked: perlrequick -- rapid tutorial perlretut -- more detailed tutorial perlreref -- quick reference -- Charles DeRykus _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med WEB PAGE: http://seattleperl.org/ From jobs-noreply at seattleperl.org Thu Jul 7 13:55:15 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Thu, 7 Jul 2005 13:55:15 -0700 (PDT) Subject: SPUG: JOB: Perl & PL/SQL Opening, Bellevue Message-ID: Accessline has a perm need for a Perl programmer with extensive PL/SQL reporting experience (3-5 years). We currently offer a Call Management System, but are moving into VoIP. Our position comes with all the usual benefits for a perm employee, but no telecommuting at this time. Feel free to get ahold of me directly at my ph# or Accessline email below. Thanks, Tom Thompson Technical Recruiter Accessline Communications 206.937.6670 recruiter at accessline.com http://www.accessline.com From jobs-noreply at seattleperl.org Thu Jul 7 13:55:55 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Thu, 7 Jul 2005 13:55:55 -0700 (PDT) Subject: SPUG: JOB: Jr & Sr Perl Openings, Lake Union (Westlake) Message-ID: I'm trying to find Jr & Sr Perl Programmers for a contract I just started. 2 are entry-level, 1 is senior. We need the basics: Perl on RedHat/Apache; OO Perl or mod_perl are pluses. If you've had Ruby, we wouldn't rule you out. Web ap programming is what you'll be doing, and you'll need to know how to do table joins on PL/SQL. Here are some more details: * We're a 6-year-old profitable, pre-IPO company offering an online community for car enthusiasts combined with online retailing. * These are perm positions directly to us (no 3rd-party recruiting) that come with full benefits like 100% employer-paid medical/vision, 401k, employer-paid life insurance, etc. Domestic partners are also eligible for benefits. * Stock options will be on a 4-year vesting schedule. * Includes the not-so-usual-anymore free drinks and free-lunch Fridays, not to mention social events throughout the year. * No telecommuting at this time. Please feel free to forward resumes directly to me. We have not posted these openings yet. Thanks, Tom Thompson Sr Technical Recruiter 206.937.6670 http://www.cardomain.net/jobs From cos at indeterminate.net Thu Jul 7 14:45:10 2005 From: cos at indeterminate.net (John Costello) Date: Thu, 7 Jul 2005 14:45:10 -0700 (PDT) Subject: SPUG: [OT] procmail extended regexp Re: Regular Expression In-Reply-To: Message-ID: On Thu, 7 Jul 2005, Duane Blanchard wrote: > My favorite online reference is http://www.regular-expressions.info/ > which covers more material for more environments than I can fathom. > > Duane Related to regular expressions, does anyone know of a good discussion of procmail's regular expressions? I encountered an odd example (discussed earlier this month on LondonPM) in which I wasn't sure if procmail would treat $? as an environment variable or an optional end-of-line character. John ----- John Costello - cos at indeterminate dot net From krahnj at telus.net Thu Jul 7 15:05:10 2005 From: krahnj at telus.net (John W. Krahn) Date: Thu, 07 Jul 2005 15:05:10 -0700 Subject: SPUG: [OT] procmail extended regexp Re: Regular Expression In-Reply-To: References: Message-ID: <42CDA716.5020708@telus.net> John Costello wrote: > On Thu, 7 Jul 2005, Duane Blanchard wrote: > >>My favorite online reference is http://www.regular-expressions.info/ >>which covers more material for more environments than I can fathom. > > Related to regular expressions, does anyone know of a good discussion of > procmail's regular expressions? I encountered an odd example (discussed > earlier this month on LondonPM) in which I wasn't sure if procmail would > treat $? as an environment variable or an optional end-of-line character. You can't use quantifiers with zero-width assertions because they match at a position in the string not any characters. If you want an optional end-of-line you have to do something like "($|)" (match end-of-line or nothing.) John -- use Perl; program fulfillment From billy at idiom.com Thu Jul 7 19:50:43 2005 From: billy at idiom.com (William T) Date: Thu, 7 Jul 2005 19:50:43 -0700 Subject: SPUG: JOB: Jr & Sr Perl Openings, Lake Union (Westlake) In-Reply-To: References: Message-ID: <20050708025043.GB37714@idiom.com> On Thu, Jul 07, 2005 at 01:55:55PM -0700, SPUG Jobs wrote: > Please feel free to forward resumes directly to me. We have not posted these > openings yet. Your email get's stripped off when you send mail to this list. -wjt From jobs-noreply at seattleperl.org Thu Jul 7 22:00:11 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Thu, 7 Jul 2005 22:00:11 -0700 (PDT) Subject: SPUG: JOB: Jr & Sr Perl Openings, Lake Union (Westlake) In-Reply-To: Message-ID: Updated contact info: Tom Thompson Sr Technical Recruiter tomt at drizzle.com 206.937.6670 http://www.cardomain.net/jobs On Thu, 7 Jul 2005, SPUG Jobs wrote: > I'm trying to find Jr & Sr Perl Programmers for a contract I just started. 2 > are entry-level, 1 is senior. We need the basics: Perl on RedHat/Apache; OO > Perl or mod_perl are pluses. If you've had Ruby, we wouldn't rule you out. > Web ap programming is what you'll be doing, and you'll need to know how to > do table joins on PL/SQL. > > Here are some more details: > * We're a 6-year-old profitable, pre-IPO company offering an online > community for car enthusiasts combined with online retailing. > * These are perm positions directly to us (no 3rd-party recruiting) that > come with full benefits like 100% employer-paid medical/vision, 401k, > employer-paid life insurance, etc. Domestic partners are also eligible > for benefits. > * Stock options will be on a 4-year vesting schedule. > * Includes the not-so-usual-anymore free drinks and free-lunch Fridays, not > to mention social events throughout the year. > * No telecommuting at this time. > > Please feel free to forward resumes directly to me. We have not posted these > openings yet. From pdarley at kinesis-cem.com Sun Jul 10 10:58:10 2005 From: pdarley at kinesis-cem.com (Peter Darley) Date: Sun, 10 Jul 2005 10:58:10 -0700 Subject: SPUG: Old versions of modules with CPAN tool Message-ID: Folks, I'm trying to get a new server to have the same versions of modules on it as my old servers. I can't find a way to get the CPAN shell to install an older version of a module; is there such a way? If not, is it likely to be OK just copying parts of the perl module directories over to the new machine? Thanks, Peter Darley From jmates at sial.org Sun Jul 10 11:24:23 2005 From: jmates at sial.org (Jeremy Mates) Date: Sun, 10 Jul 2005 11:24:23 -0700 Subject: SPUG: Old versions of modules with CPAN tool In-Reply-To: References: Message-ID: <20050710182423.GO9078@neamh.sial.org> * Peter Darley > I'm trying to get a new server to have the same versions of modules on > it as my old servers. I can't find a way to get the CPAN shell to > install an older version of a module; is there such a way? If not, is > it likely to be OK just copying parts of the perl module directories > over to the new machine? >From the CPAN shell: install L/LD/LDS/CGI.pm-2.45.tar.gz Modules can be deleted by the author, so you may want a local copy in some fashion (source tarballs, render to a vendor package system, feed a local Software Depot). Copying bits around can work, though can easily lead to odd problems (whoops, forgot to copy X) and scary unmaintainable systems. From sthoenna at efn.org Sun Jul 10 13:33:11 2005 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Sun, 10 Jul 2005 13:33:11 -0700 Subject: SPUG: Old versions of modules with CPAN tool In-Reply-To: <20050710182423.GO9078@neamh.sial.org> References: <20050710182423.GO9078@neamh.sial.org> Message-ID: <20050710203311.GA2628@efn.org> On Sun, Jul 10, 2005 at 11:24:23AM -0700, Jeremy Mates wrote: > * Peter Darley > > I'm trying to get a new server to have the same versions of modules on > > it as my old servers. I can't find a way to get the CPAN shell to > > install an older version of a module; is there such a way? If not, is > > it likely to be OK just copying parts of the perl module directories > > over to the new machine? > > >From the CPAN shell: > > install L/LD/LDS/CGI.pm-2.45.tar.gz > > Modules can be deleted by the author, so you may want a local copy in > some fashion (source tarballs, render to a vendor package system, feed > a local Software Depot). Copying bits around can work, though can > easily lead to odd problems (whoops, forgot to copy X) and scary > unmaintainable systems. I second the recommendation to not copy bits around. Note that even deleted modules are still accessible from backpan.cpan.org. (At least everything uploaded since PAUSE started, just before perl 5.001n.) From sthoenna at efn.org Sun Jul 10 13:33:34 2005 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Sun, 10 Jul 2005 13:33:34 -0700 Subject: SPUG: [OT] procmail extended regexp Re: Regular Expression In-Reply-To: <42CDA716.5020708@telus.net> References: <42CDA716.5020708@telus.net> Message-ID: <20050710203333.GB2628@efn.org> On Thu, Jul 07, 2005 at 03:05:10PM -0700, John W. Krahn wrote: > John Costello wrote: > > On Thu, 7 Jul 2005, Duane Blanchard wrote: > > > >>My favorite online reference is http://www.regular-expressions.info/ > >>which covers more material for more environments than I can fathom. > > > > Related to regular expressions, does anyone know of a good discussion of > > procmail's regular expressions? I encountered an odd example (discussed > > earlier this month on LondonPM) in which I wasn't sure if procmail would > > treat $? as an environment variable or an optional end-of-line character. > > You can't use quantifiers with zero-width assertions because they match at a > position in the string not any characters. If you want an optional > end-of-line you have to do something like "($|)" (match end-of-line or nothing.) I know you are responding to a question about procmail regular expressions, but I want to clarify that perl does allow ? or other quantifiers after zero-width assertions (though I think $? will always be treated as a variable interpolation, so you'd have to say (?:$)? ). From krahnj at telus.net Sun Jul 10 15:08:08 2005 From: krahnj at telus.net (John W. Krahn) Date: Sun, 10 Jul 2005 15:08:08 -0700 Subject: SPUG: [OT] procmail extended regexp Re: Regular Expression In-Reply-To: <20050710203333.GB2628@efn.org> References: <42CDA716.5020708@telus.net> <20050710203333.GB2628@efn.org> Message-ID: <42D19C48.6050401@telus.net> Yitzchak Scott-Thoennes wrote: > On Thu, Jul 07, 2005 at 03:05:10PM -0700, John W. Krahn wrote: > >>John Costello wrote: >> >>>On Thu, 7 Jul 2005, Duane Blanchard wrote: >>> >>>>My favorite online reference is http://www.regular-expressions.info/ >>>>which covers more material for more environments than I can fathom. >>> >>>Related to regular expressions, does anyone know of a good discussion of >>>procmail's regular expressions? I encountered an odd example (discussed >>>earlier this month on LondonPM) in which I wasn't sure if procmail would >>>treat $? as an environment variable or an optional end-of-line character. >> >>You can't use quantifiers with zero-width assertions because they match at a >>position in the string not any characters. If you want an optional >>end-of-line you have to do something like "($|)" (match end-of-line or nothing.) > > I know you are responding to a question about procmail regular > expressions, but I want to clarify that perl does allow ? or other > quantifiers after zero-width assertions (though I think $? will always > be treated as a variable interpolation, so you'd have to say (?:$)? ). Wow. I was surprised to find out that it indeed does work, at least in Perl, for example \Z?, \z?, \A?, \b?, etc. You learn something new every day. :-) John -- use Perl; program fulfillment From cos at indeterminate.net Sun Jul 10 21:59:04 2005 From: cos at indeterminate.net (John Costello) Date: Sun, 10 Jul 2005 21:59:04 -0700 (PDT) Subject: SPUG: [OT] procmail extended regexp Re: Regular Expression In-Reply-To: <42D19C48.6050401@telus.net> Message-ID: On Sun, 10 Jul 2005, John W. Krahn wrote: > Yitzchak Scott-Thoennes wrote: > > On Thu, Jul 07, 2005 at 03:05:10PM -0700, John W. Krahn wrote: > > > >>John Costello wrote: > >> > >>>On Thu, 7 Jul 2005, Duane Blanchard wrote: > >>> > >>>>My favorite online reference is http://www.regular-expressions.info/ > >>>>which covers more material for more environments than I can fathom. > >>> > >>>Related to regular expressions, does anyone know of a good discussion of > >>>procmail's regular expressions? I encountered an odd example (discussed > >>>earlier this month on LondonPM) in which I wasn't sure if procmail would > >>>treat $? as an environment variable or an optional end-of-line character. > >> > >>You can't use quantifiers with zero-width assertions because they match at a > >>position in the string not any characters. If you want an optional > >>end-of-line you have to do something like "($|)" (match end-of-line or nothing.) > > > > I know you are responding to a question about procmail regular > > expressions, but I want to clarify that perl does allow ? or other > > quantifiers after zero-width assertions (though I think $? will always > > be treated as a variable interpolation, so you'd have to say (?:$)? ). > > Wow. I was surprised to find out that it indeed does work, at least in Perl, > for example \Z?, \z?, \A?, \b?, etc. You learn something new every day. :-) I *think* that $? also works in procmail. At least, it doesn't complain. I haven't had a chance to form a mail message that should be filtered only if $? is valid as an optional end-of-line. ----- John Costello - cos at indeterminate dot net From pdarley at kinesis-cem.com Mon Jul 11 06:50:11 2005 From: pdarley at kinesis-cem.com (Peter Darley) Date: Mon, 11 Jul 2005 06:50:11 -0700 Subject: SPUG: Old versions of modules with CPAN tool In-Reply-To: <20050710182423.GO9078@neamh.sial.org> Message-ID: Jeremy, Great! Thanks for the help. Peter Darley -----Original Message----- From: spug-list-bounces at pm.org [mailto:spug-list-bounces at pm.org]On Behalf Of Jeremy Mates Sent: Sunday, July 10, 2005 11:24 AM To: SPUG Subject: Re: SPUG: Old versions of modules with CPAN tool * Peter Darley > I'm trying to get a new server to have the same versions of modules on > it as my old servers. I can't find a way to get the CPAN shell to > install an older version of a module; is there such a way? If not, is > it likely to be OK just copying parts of the perl module directories > over to the new machine? >From the CPAN shell: install L/LD/LDS/CGI.pm-2.45.tar.gz Modules can be deleted by the author, so you may want a local copy in some fashion (source tarballs, render to a vendor package system, feed a local Software Depot). Copying bits around can work, though can easily lead to odd problems (whoops, forgot to copy X) and scary unmaintainable systems. _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med WEB PAGE: http://seattleperl.org/ From jobs-noreply at seattleperl.org Mon Jul 11 18:41:00 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Mon, 11 Jul 2005 18:41:00 -0700 (PDT) Subject: SPUG: JOB: PERL programmer, Hayden, ID Message-ID: I currently have a position open for a PERL programmer, although its not in the Seattle area, yours is the closest group to us so I was hoping that some of your members might be interested in the position, as it does offer relocation benefits for anybody seeking work / living outside the city. Here is the info: Required Skillset: Perl programming in a professional environment for at least 5 years. Knowledge of programming in Linux is preferred. CGI, DBI/DBD with MySQL, and a heaping amount of dynamic html is just about all we do here so the ideal candidate must have related skills. This position is for permanent employment, salaried, on a W2 tax status. The position is offered directly through our company, Home By Design. I am not a recruiter. Benefits: Relocation benefits are offered and can be negotiated. Life, disability, medical, dental, vision insurance are provided. 401K with profit sharing, paid vacation, casual dress work environment. Physically located in Hayden, Idaho, about 4 hours east of Seattle just outside Spokane, Washington. The position does not offer telecommute. Home By Design is a profitable publishing company that creates a home and decor magazine, which is used as a marketing tool for real estate agents. We have been wildly successful and offer plenty of room to grow with us and enjoy success as we continue to create the nations fastest growing marketing system for realtors. Only restriction is that this position is open to those legally authorized to work in the US, either permanent resident, or US citizens. We are not accepting work visa applications at this time. Resumes can be emailed directly to me, or faxed to 208-676-0469 Thank you for your time and consideration. Nathan Reese Home By Design Magazine 11626 Tracey Rd Hayden, ID 83835 Phone: 208-676-0569 x102 Fax: 208-676-0469 nreese at homebydesign.com From jobs-noreply at seattleperl.org Mon Jul 11 19:12:58 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Mon, 11 Jul 2005 19:12:58 -0700 (PDT) Subject: SPUG: JOB: mod_perl programmer wanted Message-ID: DESCRIPTION: We are looking for an experienced web/e-commerce developer with a proven track record using object-oriented mod_perl, Apache, MySQL and Linux. Experience with the following CPAN modules is a definite plus: DBI, CGI, CGI::Application, HTML::Template, and Apache::Session. Your tasks will include maintaining legacy code, implementing new features, and redesigning current features with speed, security, and scalability in mind. Experience with CVS and HTML is a must; experience with JavaScript is not required but is a plus. Linux system administration experience is highly desired. Please provide a resume and be sure to include work references and code samples. QUALIFICATIONS: At least 3 years of experience with the following: perl, mod_perl, MySQL, DBI, Apache, Linux This is not an entry-level position, only highly qualified applicants will be considered. SPUG'S REQUESTED INFORMATION: contract or permanent position: Permanent for permanent positions, availability of stock options or other incentive plans: None placement through recruiter, or directly with company?: Direct W-2 vs. 1099 status: 1099 physical location: Seattle, WA telecommuting possible?: Depends on the candidate company's product or service: E-commerce, hosted storefronts info at collegegear.com From jobs-noreply at seattleperl.org Mon Jul 11 19:15:31 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Mon, 11 Jul 2005 19:15:31 -0700 (PDT) Subject: SPUG: JOB: Software Dev Engineer in Test for Isilon Systems in Seattle, WA Message-ID: COMPANY: Isilon Systems POSITION: Software Development Engineer in Test http://www.isilon.com/careers/qa_sdet.html LOCATION: Seattle, WA DATE: 06/29/05 Isilon(r) is the premier provider of intelligent clustered storage systems for digital content. Isilon's products are designed for data-intensive businesses and clustered computing environments such as those in media and entertainment, digital imaging, life sciences and oil and gas, which all produce, analyze or distribute large amounts of digital content. Isilon helps world-class companies such as Paramount, Corbis, and Technicolor meet the demands of their rapidly-growing digital content environments and accelerate the digital workflow. Check out our open Positions: SOFTWARE DEVELOPMENT ENGINEER IN TEST Do you find most QA engineers to be uncreative, unskilled, monkey-button-pushers that couldn't design their way out of a wet paper sack? When you walk into a room, do you notice where all of the exits are? Do you go camping and bring extra gear that actually ends up getting used? Isilon Systems is seeking an energetic and thorough SDE/T to grow our kick-ass team. Is it you? Requirements: * Solid grasp of operating systems concepts. * Minimum of 3 years of experience designing tests and/or software required. * Experience creating detailed Test Cases. * Mastery of at least one structured programming language (C / C++). * Advanced experience with Perl or Python required. * Proficient in at least 1 *nix shell, bash preferred. * Admin level knowledge of Linux (*nix) and Windows environments. * Experience shipping customer facing products (software and hardware), multiple lifecycles preferred. * Experience with integrated hardware and software preferred. * Basic hardware, networking, test lab management skills. * Comprehensive knowledge and application of Software Quality Assurance methodologies. * Strong written and verbal communication skills. * Ability to work successfully as part of a team. * Bachelor's degree in Computer Science or other technical degree desired. * Desire to master super-geek technology. So come join our great team! If you have the above experience and skills, we provide a unique opportunity to work with bleeding edge technology testing our multi-terabyte and multi-gigabit fileserver products, please send your resume to jobs at isilon.com (subject: Software Development Engineer in Test). A non-disclosure agreement must be signed prior to an interview. Isilon Systems is an equal opportunity employer. Relocation Available Forwards OK / Direct Hires Only Current US Work Authorization Required Beth Kester Senior Recruiter Isilon Systems | Intelligent Clustered Storage bkester at isilon.com www.isilon.com 220 W. Mercer St. | Seattle, WA 98119 T: 206.315.7482 | Cell: 206.353.9255 | Fax: 206.315.7601 From jobs-noreply at seattleperl.org Mon Jul 11 19:16:06 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Mon, 11 Jul 2005 19:16:06 -0700 (PDT) Subject: SPUG: JOB: QA Lead for Isilon Systems in Seattle, WA Message-ID: COMPANY: Isilon Systems POSITION: Quality Assurance Lead http://www.isilon.com/careers/qa_lead.html LOCATION: Seattle, WA DATE: 06/29/05 Isilon(r) is the premier provider of intelligent clustered storage systems for digital content. Isilon's products are designed for data-intensive businesses and clustered computing environments such as those in media and entertainment, digital imaging, life sciences and oil and gas, which all produce, analyze or distribute large amounts of digital content. Isilon helps world-class companies such as Paramount, Corbis, and Technicolor meet the demands of their rapidly-growing digital content environments and accelerate the digital workflow. Check out our open Positions: QUALITY ASSURANCE LEAD Isilon Systems seeks talented and proven QA Lead with leadership and mentoring skills to help expand our product certification and test automation processes. This is a lead position for an experienced Software Test Lead with a background in performance testing and test automation. This is a hands-on technical position leading a small team of test developers, executors and systems administrators. Thus, previous project planning, scheduling, cost analysis and management experience is required. Requirements: * Performance testing, test design, analysis and presentation of results. * Minimum of 6 years of test planning, scheduling and detailed Test Case design. * Proficiency in Perl or Python and at least one *nix shell script language. * Administrator level experience in mixed Linux (*nix) and Windows environments. * Experience shipping customer facing products (software and hardware), multiple lifecycles required. * 2+ years experience managing and mentoring 2-5 testers on a daily basis. * Basic hardware, networking, test lab management skills. * Comprehensive knowledge and application of Software Quality Assurance methodologies. * Strong written and verbal communication skills. * Ability to work successfully as part of a team. * Bachelor's degree in Computer Science or other technical degree desired. So come join our great team! If you have the above experience and skills, we provide a unique opportunity to work with bleeding edge technology testing our multi-terabyte and multi-gigabit fileserver products, please send your resume to jobs at isilon.com . A non-disclosure agreement must be signed prior to an interview. Isilon Systems is an equal opportunity employer. Relocation Available Forwards OK / Direct Hires Only Current US Work Authorization Required Beth Kester Senior Recruiter Isilon Systems | Intelligent Clustered Storage bkester at isilon.com www.isilon.com 220 W. Mercer St. | Seattle, WA 98119 T: 206.315.7482 | Cell: 206.353.9255 | Fax: 206.315.7601 From andrew at sweger.net Tue Jul 12 11:08:49 2005 From: andrew at sweger.net (Andrew Sweger) Date: Tue, 12 Jul 2005 11:08:49 -0700 (PDT) Subject: SPUG: Visit OSCON's Exhibit Hall Free August 2-5 Message-ID: Visit the 2005 O'Reilly Open Source Convention Exhibit Hall at the Oregon Convention Center (Hall D) in Portland, Oregon for FREE! To register for your free exhibit hall pass, please visit http://conferences.oreillynet.com/cs/os2005/create/ord_os05 This year's OSCON Exhibit Hall is the largest in our seven-year history, and will feature a virtual "who's who" of open source companies. From exciting start-ups such as ActiveGrid, BlackDuck Software, LogicBlaze, MarvelIT, Merchere, Palamida, SpikeSource, Sourcebeat, SourceLabs, and SugarCRM to industry giants like Apple Computer, Computer Associates, Google, HP, IBM, Intel, Novell, Sun Microsystems, and Yahoo!, you'll find the latest software and hardware offerings for your enterprise, small or large. The legendary Powell's Technical Bookstore will be on-site and selling all titles at a 20% discount during the show. If you're in the market for employment, several companies will be recruiting during the event, so bring a resume. Your Exhibit Hall pass also gives you access to the Products & Services Track sessions, happening Tuesday through Friday, August 2-5: http://conferences.oreillynet.com/pub/w/38/track_products.html The OSCON Exhibit Hall Hours: Wednesday, August 3, 2005 from 10:00 am-4:30 pm and 6:00-7:30 pm Oregon Convention Center, Hall D 777 NE Martin Luther King, Jr. Blvd. Portland, Oregon 97232 From jobs-noreply at seattleperl.org Thu Jul 14 17:17:19 2005 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Thu, 14 Jul 2005 17:17:19 -0700 (PDT) Subject: SPUG: JOB: Seattle PERL Contract Opportunity Message-ID: The focus of the project is to upgrade the Perl scripts within a Windows based mail system environment to perform the following functions: - Create/delete aliases for mail gateways to use based on PeopleSoft data. - Create/delete aliases from the forwarding system for users, contacts, DL's. - Create/delete user accounts on Exchange 5.5 before migration, and Exchange 2003 after migration. - Balance new accounts across several separate message stores; create balance method to be flexible and easily replaceable for planned future evolution. - Modify email/AD accounts and update GAL and folders as necessary due to account changes, deletions, change of status. - Manage creation, deletion, and changes of non-person or group accounts updating GAL as appropriate. The project includes Perl script development, testing, and modification as required to perform outlined functions. Note, more info available, if interested!! - Contract, Start Immediately/ASAP - 6-8 weeks, $65/hour - No stock options or other incentives - 1099, corporations okay - As a subcontractor, working directly with a company on a project - Seattle WA - Telecommuting okay, but onsite time definitely required throughout - The company is in the field of healthcare, research. Kory G. Smith Manager of Network Services Seitel Leeds & Associates We Make Networks Work 2 Nickerson Street, Suite 201 Seattle, WA 98109 (206) 832-2820 Network Services (206) 283-4355 Reception (206) 283-4258 Fax ksmith at sla.com http://www.sla.com From cmeyer at helvella.org Fri Jul 15 09:32:25 2005 From: cmeyer at helvella.org (Colin Meyer) Date: Fri, 15 Jul 2005 09:32:25 -0700 Subject: SPUG: July Meeting? Message-ID: <20050715163225.GP31364@funpox.helvella.org> Andrew, SPUGgers, Are we having a meeting next Tuesday? -Colin. From dblanchard at gmail.com Fri Jul 15 15:05:17 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Fri, 15 Jul 2005 15:05:17 -0700 Subject: SPUG: July Meeting? In-Reply-To: <20050715163225.GP31364@funpox.helvella.org> References: <20050715163225.GP31364@funpox.helvella.org> Message-ID: I'm in. Duane On 7/15/05, Colin Meyer wrote: > Andrew, SPUGgers, > > Are we having a meeting next Tuesday? > > -Colin. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From andrew at sweger.net Fri Jul 15 16:16:42 2005 From: andrew at sweger.net (Andrew Sweger) Date: Fri, 15 Jul 2005 16:16:42 -0700 (PDT) Subject: SPUG: July Meeting? In-Reply-To: <20050715163225.GP31364@funpox.helvella.org> Message-ID: Dunno. Is that next week? Wow. Time flies when you're drywalling. We have a not-regular meeting 1 August with Stas Bekman that needs to be set up. Does anyone have a topic for next Tuesday? Hey, maybe there's someplace not smokey and not noisy with food and drink where we could gather? Ideas anyone? On Fri, 15 Jul 2005, Colin Meyer wrote: > Are we having a meeting next Tuesday? -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From rizvi at amazon.com Mon Jul 18 14:57:24 2005 From: rizvi at amazon.com (Rizvi, Ali) Date: Mon, 18 Jul 2005 14:57:24 -0700 Subject: SPUG: July Meeting? Message-ID: <55C0724D26281F40A605FB85F110443407C54197@ex-mail-sea-04.ant.amazon.com> Looks like we don't have a meeting scheduled for tomorrow and I would not have to come to Pac-Med tomorrow night to receive our perly friends. I was making some plans for tomorrow night and wanted to send this email just in case there was any confusion. Ali -----Original Message----- From: spug-list-bounces at pm.org [mailto:spug-list-bounces at pm.org] On Behalf Of Andrew Sweger Sent: Friday, July 15, 2005 4:17 PM To: Colin Meyer Cc: spug-list at mail.pm.org Subject: Re: SPUG: July Meeting? Dunno. Is that next week? Wow. Time flies when you're drywalling. We have a not-regular meeting 1 August with Stas Bekman that needs to be set up. Does anyone have a topic for next Tuesday? Hey, maybe there's someplace not smokey and not noisy with food and drink where we could gather? Ideas anyone? On Fri, 15 Jul 2005, Colin Meyer wrote: > Are we having a meeting next Tuesday? -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med WEB PAGE: http://seattleperl.org/ From andrew at sweger.net Mon Jul 18 15:10:44 2005 From: andrew at sweger.net (Andrew Sweger) Date: Mon, 18 Jul 2005 15:10:44 -0700 (PDT) Subject: SPUG: July Meeting? In-Reply-To: <55C0724D26281F40A605FB85F110443407C54197@ex-mail-sea-04.ant.amazon.com> Message-ID: Go for it. Make plans. Have a good time. The response to anything for tomorrow night has been nil. On Mon, 18 Jul 2005, Rizvi, Ali wrote: > Looks like we don't have a meeting scheduled for tomorrow and I would not have to come to Pac-Med tomorrow night to receive our perly friends. > > I was making some plans for tomorrow night and wanted to send this email just in case there was any confusion. > > Ali > > -----Original Message----- > From: spug-list-bounces at pm.org [mailto:spug-list-bounces at pm.org] On Behalf Of Andrew Sweger > Sent: Friday, July 15, 2005 4:17 PM > To: Colin Meyer > Cc: spug-list at mail.pm.org > Subject: Re: SPUG: July Meeting? > > Dunno. Is that next week? Wow. Time flies when you're drywalling. > > We have a not-regular meeting 1 August with Stas Bekman that needs to be > set up. > > Does anyone have a topic for next Tuesday? Hey, maybe there's someplace > not smokey and not noisy with food and drink where we could gather? Ideas > anyone? > > On Fri, 15 Jul 2005, Colin Meyer wrote: > > > Are we having a meeting next Tuesday? > > -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From andrew at sweger.net Tue Jul 19 14:41:17 2005 From: andrew at sweger.net (Andrew Sweger) Date: Tue, 19 Jul 2005 14:41:17 -0700 (PDT) Subject: SPUG: Stas Bekman, 6-8 August Message-ID: Stas Bekman will be in Seattle from Saturday, 6 August, to Monday, 8 August. (Please disregard the incorrect dates I may have given recently.) He will be giving a free presentation (on mod_perl most likely). Please discuss preferences for a meeting time: weekend daytime, weekend evening, or Monday evening. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From dblanchard at gmail.com Tue Jul 19 14:49:39 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Tue, 19 Jul 2005 14:49:39 -0700 Subject: SPUG: Stas Bekman, 6-8 August In-Reply-To: References: Message-ID: Weekday evening (pref. M-R, not F), after 4:00. Duane On 7/19/05, Andrew Sweger wrote: > Stas Bekman will be in Seattle from Saturday, 6 August, to Monday, 8 > August. (Please disregard the incorrect dates I may have given > recently.) He will be giving a free presentation (on mod_perl most > likely). Please discuss preferences for a meeting time: weekend daytime, > weekend evening, or Monday evening. > > -- > Andrew B. Sweger -- The great thing about multitasking is that several > things can go wrong at once. > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From jay at scherrer.com Tue Jul 19 15:46:18 2005 From: jay at scherrer.com (Jay Scherrer) Date: Tue, 19 Jul 2005 15:46:18 -0700 Subject: SPUG: Stas Bekman, 6-8 August In-Reply-To: References: Message-ID: <1121813178.3341.11.camel@gimly.scherco.local> On Tue, 2005-07-19 at 14:49 -0700, Duane Blanchard wrote: > Weekday evening (pref. M-R, not F), after 4:00. > > Duane > > On 7/19/05, Andrew Sweger wrote: > > Stas Bekman will be in Seattle from Saturday, 6 August, to Monday, 8 > > August. (Please disregard the incorrect dates I may have given > > recently.) He will be giving a free presentation (on mod_perl most > > likely). Please discuss preferences for a meeting time: weekend daytime, > > weekend evening, or Monday evening. > > > > -- > > Andrew B. Sweger -- The great thing about multitasking is that several > > things can go wrong at once. > > > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list at pm.org > > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > > WEB PAGE: http://seattleperl.org/ > > > > Just in case if the lecture will run long, how about a late afternoon Sunday like 3:00PM. 'Cause Saturday he'll be accommodating and Monday he'll be packing. How long would his mod_perl presentation last or usually last? Jay Scherrer From james at banshee.com Tue Jul 19 16:02:23 2005 From: james at banshee.com (James Moore) Date: Tue, 19 Jul 2005 16:02:23 -0700 Subject: SPUG: Stas Bekman, 6-8 August In-Reply-To: <1121813178.3341.11.camel@gimly.scherco.local> Message-ID: <200507192301.j6JN1gAl000936@server2.banshee.com> I suspect that on a summer weekend attendance would be sparse at best. I'd prefer Monday evening. - James From LMedrano-Zaldivar at ciber.com Wed Jul 20 14:35:09 2005 From: LMedrano-Zaldivar at ciber.com (Medrano-Zaldivar, L E) Date: Wed, 20 Jul 2005 15:35:09 -0600 Subject: SPUG: Sleep Message-ID: <8FFDEE1FC17DFB4BAF050331C185449F40FFA0@srv-corp-exmb4.ciber.cbr.inc> List, I need to put sleep a script for 5 min and after that I need for the script to keep running how can I do that? Thanks, Luis From atom.powers at gmail.com Wed Jul 20 14:44:39 2005 From: atom.powers at gmail.com (Atom Powers) Date: Wed, 20 Jul 2005 14:44:39 -0700 Subject: SPUG: Get the local IP address? Message-ID: I'm trying to write a script what will give me the host name ( from DNS ) for whatever machine it is run on. The stumbling block is getting the local IP address. Can anybody give me clues to how I can grab the local IP address of the computer, given an arbritrary number of interfaces (but only one of them has an IP address)? And once I have the address, I can do this, right? $hostname = gethostbyaddr(inet_aton($address), AF_INET) -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- From tim at consultix-inc.com Wed Jul 20 14:52:51 2005 From: tim at consultix-inc.com (Tim Maher) Date: Wed, 20 Jul 2005 14:52:51 -0700 Subject: SPUG: Sleep In-Reply-To: <8FFDEE1FC17DFB4BAF050331C185449F40FFA0@srv-corp-exmb4.ciber.cbr.inc> References: <8FFDEE1FC17DFB4BAF050331C185449F40FFA0@srv-corp-exmb4.ciber.cbr.inc> Message-ID: <20050720215251.GA23412@jumpy.consultix-inc.com> On Wed, Jul 20, 2005 at 03:35:09PM -0600, Medrano-Zaldivar, L E wrote: > List, > > I need to put sleep a script for 5 min and after that I need > for the script to keep running how can I do that? > > Thanks, > > Luis # Ready to sleep for 5 minutes sleep (5*60); # Awake, now script resumes See "perldoc -f sleep" for additional details. *--------------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Fall, 2005 book: "Minimal Perl for UNIX/Linux People" | | See http://minimalperl.com for details, ordering, and email-list signup | *--------------------------------------------------------------------------* From m3047 at inwa.net Wed Jul 20 14:50:54 2005 From: m3047 at inwa.net (Fred Morris) Date: Wed, 20 Jul 2005 14:50:54 -0700 Subject: SPUG: Get the local IP address? Message-ID: At 2:44 PM 7/20/05, Atom Powers wrote: >I'm trying to write a script what will give me the host name ( from >DNS ) for whatever machine it is run on. The stumbling block is >getting the local IP address. > Hate to throw a spanner in the works, but machines can have multiple network cards; it is unlikely that they will all have the same address. It is also possible for a single card to be multi-homed. OS-dependent answers include looking for a file /etc/HOSTNAME. Also, what does hostname -i return? How does that compare to what plain old hostname returns (do they translate to one another)? (on Linux) That's another common problem: systems which are misconfigured. Very common, biggest support PITA for systems which are sensitive to this sort of issue that you can possibly imagine. Or, how about the systems which don't even know who they are until they ask a DNS server? Yes, they're out there (this is common on HP-UX)! Is there a Perlish solution to this rather complex problem? Inquiring minds want to know! -- Fred Morris http://www.inwa.net/~m3047/contact.html From atom.powers at gmail.com Wed Jul 20 15:05:27 2005 From: atom.powers at gmail.com (Atom Powers) Date: Wed, 20 Jul 2005 15:05:27 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: Message-ID: This script is going to run only in a controlled situation. It's part of my system imaging process, which requires that the system is registered in DNS by the IP of the network card which is in use, and there will be only one NIC in use during the build process. Which in turn gets it's IP from reserved DHCP. So, even though it may have multiple interfaces it will have only one address assigned, and that address will have only one hostname associated with it. I need that hostname so I can set the hostname of the system during the build. On 7/20/05, Fred Morris wrote: > At 2:44 PM 7/20/05, Atom Powers wrote: > >I'm trying to write a script what will give me the host name ( from > >DNS ) for whatever machine it is run on. The stumbling block is > >getting the local IP address. > > > > Hate to throw a spanner in the works, but machines can have multiple > network cards; it is unlikely that they will all have the same address. It > is also possible for a single card to be multi-homed. > > OS-dependent answers include looking for a file /etc/HOSTNAME. Also, what > does hostname -i return? How does that compare to what plain old hostname > returns (do they translate to one another)? (on Linux) > > That's another common problem: systems which are misconfigured. Very > common, biggest support PITA for systems which are sensitive to this sort > of issue that you can possibly imagine. > > Or, how about the systems which don't even know who they are until they ask > a DNS server? Yes, they're out there (this is common on HP-UX)! > > > Is there a Perlish solution to this rather complex problem? Inquiring minds > want to know! > > -- > > Fred Morris > http://www.inwa.net/~m3047/contact.html > > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- From bill at celestial.com Wed Jul 20 15:18:41 2005 From: bill at celestial.com (Bill Campbell) Date: Wed, 20 Jul 2005 15:18:41 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: Message-ID: <20050720221841.GA80583@alexis.mi.celestial.com> On Wed, Jul 20, 2005, Fred Morris wrote: >At 2:44 PM 7/20/05, Atom Powers wrote: >>I'm trying to write a script what will give me the host name ( from >>DNS ) for whatever machine it is run on. The stumbling block is >>getting the local IP address. >> > >Hate to throw a spanner in the works, but machines can have multiple >network cards; it is unlikely that they will all have the same address. It >is also possible for a single card to be multi-homed. > >OS-dependent answers include looking for a file /etc/HOSTNAME. Also, what >does hostname -i return? How does that compare to what plain old hostname >returns (do they translate to one another)? (on Linux) > >That's another common problem: systems which are misconfigured. Very >common, biggest support PITA for systems which are sensitive to this sort >of issue that you can possibly imagine. > >Or, how about the systems which don't even know who they are until they ask >a DNS server? Yes, they're out there (this is common on HP-UX)! > >Is there a Perlish solution to this rather complex problem? Inquiring minds >want to know! I handle this with a module I wrote that scans the output of the ifconfig command with appropriate conversions based on the underlying OS. This is fairly simple on Linux since each IP address is assigned it's own device name (e.g. eth0, eth0:1, eth1, eth1:1, etc.). FreeBSD is more interesting since there is an interface for each physical NIC, and an interface may have more than one IP address. SCO OpenServer has multiple IPs per NIC too, and makes it more interesting as one has to first parse the output of the ``netstat -in'' command to get a list of interfaces, then run ``ifconfig interface'' to get the specifics for that interface. Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``Do not meddle in the affairs of cats, for they are subtle and will piss on your computer.'' --Bruce Graham From atom.powers at gmail.com Wed Jul 20 15:27:58 2005 From: atom.powers at gmail.com (Atom Powers) Date: Wed, 20 Jul 2005 15:27:58 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: <20050720221841.GA80583@alexis.mi.celestial.com> References: <20050720221841.GA80583@alexis.mi.celestial.com> Message-ID: On 7/20/05, Bill Campbell wrote: > I handle this with a module I wrote that scans the output of the ifconfig > command with appropriate conversions based on the underlying OS. > I was hoping to avoid parsing ifconfig. But I haven't found any other way. From bill at celestial.com Wed Jul 20 15:35:38 2005 From: bill at celestial.com (Bill Campbell) Date: Wed, 20 Jul 2005 15:35:38 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: <20050720221841.GA80583@alexis.mi.celestial.com> Message-ID: <20050720223538.GB81315@alexis.mi.celestial.com> On Wed, Jul 20, 2005, Atom Powers wrote: >On 7/20/05, Bill Campbell wrote: > >> I handle this with a module I wrote that scans the output of the ifconfig >> command with appropriate conversions based on the underlying OS. >> > >I was hoping to avoid parsing ifconfig. But I haven't found any other way. It's not too difficult with a few regular expressions. Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe and not make messes in the house. -- Lazarus Long, "Time Enough for Love" From atom.powers at gmail.com Wed Jul 20 15:46:53 2005 From: atom.powers at gmail.com (Atom Powers) Date: Wed, 20 Jul 2005 15:46:53 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: <20050720223538.GB81315@alexis.mi.celestial.com> References: <20050720221841.GA80583@alexis.mi.celestial.com> <20050720223538.GB81315@alexis.mi.celestial.com> Message-ID: I know. I was just hoping for a simpler solution. Regex is so easy to get wrong... On 7/20/05, Bill Campbell wrote: > On Wed, Jul 20, 2005, Atom Powers wrote: > >On 7/20/05, Bill Campbell wrote: > > > >> I handle this with a module I wrote that scans the output of the ifconfig > >> command with appropriate conversions based on the underlying OS. > >> > > > >I was hoping to avoid parsing ifconfig. But I haven't found any other way. > > It's not too difficult with a few regular expressions. > > Bill > -- > INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC > UUCP: camco!bill PO Box 820; 6641 E. Mercer Way > FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 > URL: http://www.celestial.com/ > > Anyone who cannot cope with mathematics is not fully human. At best he > is a tolerable subhuman who has learned to wear shoes, bathe and not > make messes in the house. > -- Lazarus Long, "Time Enough for Love" > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- From charles.e.derykus at boeing.com Wed Jul 20 15:49:42 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Wed, 20 Jul 2005 15:49:42 -0700 Subject: SPUG: Get the local IP address? Message-ID: >I'm trying to write a script what will give me the host name ( from DNS ) > for whatever machine it is run on. The stumbling block is getting the > local IP address. > Can anybody give me clues to how I can grab the local IP address of the > computer, given an arbritrary number of interfaces (but only one of them > has an IP address)? > And once I have the address, I can do this, right? > $hostname = gethostbyaddr(inet_aton($address), AF_INET) Any reason you must get an IP-to-name translation rather than just using Sys::Hostname...? -- Charles DeRykus From jay at scherrer.com Wed Jul 20 16:23:50 2005 From: jay at scherrer.com (Jay Scherrer) Date: Wed, 20 Jul 2005 16:23:50 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: <20050720221841.GA80583@alexis.mi.celestial.com> Message-ID: <1121901830.3347.32.camel@gimly.scherco.local> On Wed, 2005-07-20 at 15:27 -0700, Atom Powers wrote: > On 7/20/05, Bill Campbell wrote: > > > I handle this with a module I wrote that scans the output of the ifconfig > > command with appropriate conversions based on the underlying OS. > > > > I was hoping to avoid parsing ifconfig. But I haven't found any other way. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ I have been working with one script called "dnswalk-2.0.2" by David Barr . This script is built upon NET::DNS. This perl script is meant for debugging DNS entries through to sub-domains. Although the latest release is 1997 it still works and it might be what your looking for to decipher ip addresses. Jay Scherrer From bill at celestial.com Wed Jul 20 16:43:12 2005 From: bill at celestial.com (Bill Campbell) Date: Wed, 20 Jul 2005 16:43:12 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: <20050720221841.GA80583@alexis.mi.celestial.com> <20050720223538.GB81315@alexis.mi.celestial.com> Message-ID: <20050720234312.GA86718@alexis.mi.celestial.com> On Wed, Jul 20, 2005, Atom Powers wrote: >I know. I was just hoping for a simpler solution. >Regex is so easy to get wrong... Here's the guts of my routine parsing Linux ifconfig. The regular expressions are rather trivial. open(IFCONFIG, "/sbin/ifconfig |"); my $key = ''; while() { chomp; # print STDERR; if(/^(\S+)/) { $key = $1; $rc{$key} = {}; } $rc{$key}->{HWaddr} = $1 if(/HWaddr\s+(\S+)/); $rc{$key}->{ipaddr} = $1 if(/inet addr:(\S+)/); $rc{$key}->{bcast} = $1 if(/Bcast:(\S+)/); $rc{$key}->{mask} = $1 if(/Mask:(\S+)/); } Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``The only freedom which deserves the name, is that of pursuing our own good in our own way, so long as we do not attempt to deprive others of theirs, or impede their efforts to obtain it.'' -- John Stuart Mill, 1859 From dblanchard at gmail.com Wed Jul 20 18:19:02 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Wed, 20 Jul 2005 18:19:02 -0700 Subject: SPUG: Reading a whole file into a scalar. Message-ID: Hi gang, I'm too tired to think straight and too tired to keep looking on the 'Net. I want to match things like 'line\s+that' in the example file below. this is a line that is a line What has worn me out today is not realizing that I'll never match across lines of a file if I only read one line at a time. So, I either need a clever way to match across elements of an array or hash table, or (more likely) to read the whole file into a scalar. As I recall, I'll use the 'm' flag to hand the RE more than one line, and '\s' should handle '\n'. Someone, please give a little pointer. Thanks, D -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From m3047 at inwa.net Wed Jul 20 18:17:55 2005 From: m3047 at inwa.net (Fred Morris) Date: Wed, 20 Jul 2005 18:17:55 -0700 Subject: SPUG: State technology standards and Legislative intent Message-ID: By the way, For the past six months (longer actually) i've been learning a lot about IT and State government; this has included two trips to Olympia, a couple of Public Information Requests, and some e-mails to the Technology, Energy and Communications (TEC) Committee, who would appear to have oversight. There has been no substantive response to my request for an explanation of legislative intent. I have posted the two most pertinent e-mails here: http://www.inwa.net/~m3047/legislative-intent.html This isn't specifically a Perl issue, but since I just posted a response to a Perlish question here on the SPUG list I'm claiming a variant of the "30 second rule". If you are in Washington state, your comments, public or private, will be welcomed. (I'll probably post something to the GSLUG list too... oh what the heck I'll crosspost.) -- Fred Morris m3047 at i.n.w.a dot net From dblanchard at gmail.com Wed Jul 20 18:24:49 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Wed, 20 Jul 2005 18:24:49 -0700 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: References: Message-ID: I just found this, is this the best practice? while ( ) { $myfile = $myfile . $_; } Duane On 7/20/05, Duane Blanchard wrote: > Hi gang, > > I'm too tired to think straight and too tired to keep looking on the > 'Net. I want to match things like 'line\s+that' in the example file > below. > > > this is a line > that is a line > > > What has worn me out today is not realizing that I'll never match > across lines of a file if I only read one line at a time. So, I either > need a clever way to match across elements of an array or hash table, > or (more likely) to read the whole file into a scalar. As I recall, > I'll use the 'm' flag to hand the RE more than one line, and '\s' > should handle '\n'. > > Someone, please give a little pointer. Thanks, > > D > -- > Duane Blanchard > 206.934.5873 > > There are 10 kinds of people in the world; > those who know binary and those who don't. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From m3047 at inwa.net Wed Jul 20 18:28:18 2005 From: m3047 at inwa.net (Fred Morris) Date: Wed, 20 Jul 2005 18:28:18 -0700 Subject: SPUG: Reading a whole file into a scalar. Message-ID: local $/; # Slurp. # Open the error page template or get upset. if ($params->{group}) { open(TMPL, '<' . screens() . 'group-alpha.tmpl') or return "Unable to open page template: $!"; } else { open(TMPL, '<' . screens() . 'contacts-alpha.tmpl') or return "Unable to open page template: $!"; } # Read it in. (defined($text = )) or return "Failed read in page template: $!"; # Close the file. close( TMPL ) or return "Error closing page template: $!"; # Substitute the global params into the template. $text =~ s/%%magic%%/$params->{magic}/gsi; To match the newlines, you want to use either/both the m (^ or $ at embedded newline) or s (. matches newline) qualifiers, and to match all instances (global replace) g. So for instance: # Substitute the global params into the template. # (Not the best example of why you need m or s, since it is neither testing a # BOL/EOL assertion, nor matching spaces.) $text =~ s/%%magic%%/$params->{magic}/gsi; At 6:19 PM 7/20/05, Duane Blanchard wrote: >Hi gang, > >I'm too tired to think straight and too tired to keep looking on the >'Net. I want to match things like 'line\s+that' in the example file >below. > > >this is a line >that is a line > > From david.dyck at fluke.com Wed Jul 20 18:40:10 2005 From: david.dyck at fluke.com (David Dyck) Date: Wed, 20 Jul 2005 18:40:10 -0700 (PDT) Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: References: Message-ID: On Wed, 20 Jul 2005 at 18:19 -0700, Duane Blanchard ...: > ... I ... need a clever way ... to read the whole file into a scalar. ... > > Someone, please give a little pointer. Thanks, There is a great article at http://www.perl.com/pub/a/2003/11/21/slurp.html From rick.croote at philips.com Wed Jul 20 18:46:47 2005 From: rick.croote at philips.com (Rick Croote) Date: Wed, 20 Jul 2005 18:46:47 -0700 Subject: SPUG: Fw: Reading a whole file into a scalar. Message-ID: Nothing super sneaky, I just prefer the OO interfaces. This just uses join. use strict; use IO::File; { my $fh = new IO::File 'Colours.xml'; my $file = join '', $fh->getlines; print $file; } --- Rick Croote Software Engineer Environment and Tools Team Philips Medical Systems Bothell, WA Rick.Croote at Philips.com Phone: 425-487-7834 ----- Forwarded by Rick Croote/ATL-BTL/MS/PHILIPS on 2005-07-20 06:44 PM ----- spug-list-bounces at pm.org wrote on 2005-07-20 06:24:49 PM: > I just found this, is this the best practice? > > while ( ) > { > $myfile = $myfile . $_; > } > > Duane > > On 7/20/05, Duane Blanchard wrote: > > Hi gang, > > > > I'm too tired to think straight and too tired to keep looking on the > > 'Net. I want to match things like 'line\s+that' in the example file > > below. > > > > > > this is a line > > that is a line > > > > > > What has worn me out today is not realizing that I'll never match > > across lines of a file if I only read one line at a time. So, I either > > need a clever way to match across elements of an array or hash table, > > or (more likely) to read the whole file into a scalar. As I recall, > > I'll use the 'm' flag to hand the RE more than one line, and '\s' > > should handle '\n'. > > > > Someone, please give a little pointer. Thanks, > > > > D > > -- > > Duane Blanchard > > 206.934.5873 > > > > There are 10 kinds of people in the world; > > those who know binary and those who don't. > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list at pm.org > > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > > WEB PAGE: http://seattleperl.org/ > > > > > -- > Duane Blanchard > 206.934.5873 > > There are 10 kinds of people in the world; > those who know binary and those who don't. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20050721/e90c0f2c/attachment-0001.html From dha at panix.com Wed Jul 20 19:05:00 2005 From: dha at panix.com (David H. Adler) Date: Wed, 20 Jul 2005 22:05:00 -0400 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: References: Message-ID: <20050721020500.GA16986@panix.com> On Wed, Jul 20, 2005 at 06:40:10PM -0700, David Dyck wrote: > On Wed, 20 Jul 2005 at 18:19 -0700, Duane Blanchard ...: > > > ... I ... need a clever way ... to read the whole file into a scalar. ... > > > > Someone, please give a little pointer. Thanks, > > There is a great article at > > http://www.perl.com/pub/a/2003/11/21/slurp.html There's even a module! http://search.cpan.org/~uri/File-Slurp-9999.09/lib/File/Slurp.pm dha -- David H. Adler - - http://www.panix.com/~dha/ Any country that has the words "play ball" in its national anthem can't be all bad. - Greg McCarroll From krahnj at telus.net Wed Jul 20 20:04:16 2005 From: krahnj at telus.net (John W. Krahn) Date: Wed, 20 Jul 2005 20:04:16 -0700 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: References: Message-ID: <42DF10B0.2090605@telus.net> Duane Blanchard wrote: > Hi gang, > > I'm too tired to think straight and too tired to keep looking on the > 'Net. I want to match things like 'line\s+that' in the example file > below. > > > this is a line > that is a line > > > What has worn me out today is not realizing that I'll never match > across lines of a file if I only read one line at a time. So, I either > need a clever way to match across elements of an array or hash table, > or (more likely) to read the whole file into a scalar. As I recall, > I'll use the 'm' flag to hand the RE more than one line, and '\s' > should handle '\n'. > > Someone, please give a little pointer. Thanks, perldoc -q "How can I read in an entire file all at once" John From haircut at gmail.com Wed Jul 20 22:29:59 2005 From: haircut at gmail.com (Adam Monsen) Date: Wed, 20 Jul 2005 22:29:59 -0700 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: References: Message-ID: <9ebd65110507202229461e2ad4@mail.gmail.com> Not sure if what you mentioned is "best practice". Here's the obligatory one-liner: $ perl -0ne 'print "MATCH: $1\n" if m/(line.*that)/s' poo.html MATCH: line that The -0 switch--documented in perldoc perlrun--specifies the input record separator. I didn't give it any digits, so the input record separator is the null character. Since there aren't any null characters in the file, the whole thing is sucked into $_. -n and -e are also documented in perldoc perlrun. But... I'm really an IO::All fan. #!/usr/bin/perl -w use strict; use IO::All; my $contents = io('poo.html')->slurp; if ($contents =~ m/(line.*that)/s) { print "MATCH! ... $1\n" } I'm assuming that poo.html contains the XML-like markup example in your original post. 'poo.html' could be changed to a URL (http://example.com/poo.html) and IO:All would just do the right thing. Hm, well, let's just try it. #!/usr/bin/perl -w use strict; use IO::All; my $contents = io('http://rafb.net/paste/results/GHgbSG94.txt')->slurp; if ($contents =~ m/(line.*that)/s) { print "MATCH! ... $1\n" } You'll need IO::All::LWP installed for that one to work. When doing multiline matches, the only alternative to slurping in the file that I can think of is to make a mini state machine: when 'line' is found, switch states until 'that' is found. Good luck matching across hash or array elements. Other notes: * You're right about the 's'. The 's' modifier to the regular expression makes the . match everything, including newlines. The docs (perldoc perlop) say 's' causes the regex engine to "treat the entire string as one line", and in this case it means we can do a multiline match. * check out http://perlmonks.org ... I learned a ton from this site. Plus, it's fun. If you want to search it, use the crawler-friendly version. in Google, search for: "site:perlmonks.thepen.com keywords" (substituting "keywords" for your search terms, of course). Some Perl heavyweights frequent this site. * are you parsing XML/HTML/etc. markup? If so, there are a ton of modules to make your life easier. * always use warnings, always use strict. * here's an article on IO::All ... http://www.perl.com/pub/a/2004/03/12/ioall.html hope this helps, -Adam On 7/20/05, Duane Blanchard wrote: > I just found this, is this the best practice? > > while ( ) > { > $myfile = $myfile . $_; > } > > Duane > > On 7/20/05, Duane Blanchard wrote: > > Hi gang, > > > > I'm too tired to think straight and too tired to keep looking on the > > 'Net. I want to match things like 'line\s+that' in the example file > > below. > > > > > > this is a line > > that is a line > > > > > > What has worn me out today is not realizing that I'll never match > > across lines of a file if I only read one line at a time. So, I either > > need a clever way to match across elements of an array or hash table, > > or (more likely) to read the whole file into a scalar. As I recall, > > I'll use the 'm' flag to hand the RE more than one line, and '\s' > > should handle '\n'. > > > > Someone, please give a little pointer. Thanks, > > > > D > > -- > > Duane Blanchard > > 206.934.5873 > > > > There are 10 kinds of people in the world; > > those who know binary and those who don't. > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list at pm.org > > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > > WEB PAGE: http://seattleperl.org/ > > > > > -- > Duane Blanchard > 206.934.5873 > > There are 10 kinds of people in the world; > those who know binary and those who don't. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -- Adam Monsen http://adammonsen.com/ From billw at onedrous.org Wed Jul 20 22:51:45 2005 From: billw at onedrous.org (Bill Warner) Date: Wed, 20 Jul 2005 22:51:45 -0700 Subject: SPUG: Sleep In-Reply-To: <20050720215251.GA23412@jumpy.consultix-inc.com> References: <8FFDEE1FC17DFB4BAF050331C185449F40FFA0@srv-corp-exmb4.ciber.cbr.inc> <20050720215251.GA23412@jumpy.consultix-inc.com> Message-ID: <1121925105.1467.19.camel@localhost.localdomain> Without knowing your requirements, I'll chime in with this. Usually, when I want to sleep, I want to execute then sleep for an indefinite number of iterations. Also, I want to execute every 5 minutes, not every 5 minutes plus the exection time. So I end up with something like this. my $period = 5*60; # 5 minutes while(1) { my $btime = time(); execute(); my $exec_time = (time() - $btime) % $period; # take the remainder just in case execution time exceeds our period sleep($period - $exec_time); } -Bill On Wed, 2005-07-20 at 14:52 -0700, Tim Maher wrote: > On Wed, Jul 20, 2005 at 03:35:09PM -0600, Medrano-Zaldivar, L E wrote: > > List, > > > > I need to put sleep a script for 5 min and after that I need > > for the script to keep running how can I do that? > > > > > Thanks, > > > > Luis > > # Ready to sleep for 5 minutes > sleep (5*60); > # Awake, now script resumes > > See "perldoc -f sleep" for additional details. > > *--------------------------------------------------------------------------* > | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | > | tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com | > *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* > | Watch for my Fall, 2005 book: "Minimal Perl for UNIX/Linux People" | > | See http://minimalperl.com for details, ordering, and email-list signup | > *--------------------------------------------------------------------------* > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ From dblanchard at gmail.com Wed Jul 20 23:28:34 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Wed, 20 Jul 2005 23:28:34 -0700 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: <9ebd65110507202229461e2ad4@mail.gmail.com> References: <9ebd65110507202229461e2ad4@mail.gmail.com> Message-ID: Thank you all. This is a key thing that makes Perl rewarding, the community. I'm finally off to bed having lain my XML to rest also. Duane On 7/20/05, Adam Monsen wrote: > Not sure if what you mentioned is "best practice". > > Here's the obligatory one-liner: > > $ perl -0ne 'print "MATCH: $1\n" if m/(line.*that)/s' poo.html > MATCH: line > that > > The -0 switch--documented in perldoc perlrun--specifies the input > record separator. I didn't give it any digits, so the input record > separator is the null character. Since there aren't any null > characters in the file, the whole thing is sucked into $_. -n and -e > are also documented in perldoc perlrun. > > But... I'm really an IO::All fan. > > #!/usr/bin/perl -w > use strict; > use IO::All; > my $contents = io('poo.html')->slurp; > if ($contents =~ m/(line.*that)/s) { > print "MATCH! ... $1\n" > } > > I'm assuming that poo.html contains the XML-like markup example in > your original post. 'poo.html' could be changed to a URL > (http://example.com/poo.html) and IO:All would just do the right > thing. Hm, well, let's just try it. > > #!/usr/bin/perl -w > use strict; > use IO::All; > my $contents = io('http://rafb.net/paste/results/GHgbSG94.txt')->slurp; > if ($contents =~ m/(line.*that)/s) { > print "MATCH! ... $1\n" > } > > You'll need IO::All::LWP installed for that one to work. > > When doing multiline matches, the only alternative to slurping in the > file that I can think of is to make a mini state machine: when 'line' > is found, switch states until 'that' is found. Good luck matching > across hash or array elements. > > Other notes: > * You're right about the 's'. The 's' modifier to the regular > expression makes the . match everything, including newlines. The docs > (perldoc perlop) say 's' causes the regex engine to "treat the entire > string as one line", and in this case it means we can do a multiline > match. > * check out http://perlmonks.org ... I learned a ton from this site. > Plus, it's fun. If you want to search it, use the crawler-friendly > version. in Google, search for: "site:perlmonks.thepen.com keywords" > (substituting "keywords" for your search terms, of course). Some Perl > heavyweights frequent this site. > * are you parsing XML/HTML/etc. markup? If so, there are a ton of > modules to make your life easier. > * always use warnings, always use strict. > * here's an article on IO::All ... > http://www.perl.com/pub/a/2004/03/12/ioall.html > > hope this helps, > -Adam > > On 7/20/05, Duane Blanchard wrote: > > I just found this, is this the best practice? > > > > while ( ) > > { > > $myfile = $myfile . $_; > > } > > > > Duane > > > > On 7/20/05, Duane Blanchard wrote: > > > Hi gang, > > > > > > I'm too tired to think straight and too tired to keep looking on the > > > 'Net. I want to match things like 'line\s+that' in the example file > > > below. > > > > > > > > > this is a line > > > that is a line > > > > > > > > > What has worn me out today is not realizing that I'll never match > > > across lines of a file if I only read one line at a time. So, I either > > > need a clever way to match across elements of an array or hash table, > > > or (more likely) to read the whole file into a scalar. As I recall, > > > I'll use the 'm' flag to hand the RE more than one line, and '\s' > > > should handle '\n'. > > > > > > Someone, please give a little pointer. Thanks, > > > > > > D > > > -- > > > Duane Blanchard > > > 206.934.5873 > > > > > > There are 10 kinds of people in the world; > > > those who know binary and those who don't. > > > _____________________________________________________________ > > > Seattle Perl Users Group Mailing List > > > POST TO: spug-list at pm.org > > > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > > > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > > > WEB PAGE: http://seattleperl.org/ > > > > > > > > > -- > > Duane Blanchard > > 206.934.5873 > > > > There are 10 kinds of people in the world; > > those who know binary and those who don't. > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list at pm.org > > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > > WEB PAGE: http://seattleperl.org/ > > > > > -- > Adam Monsen > http://adammonsen.com/ > -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From tallpeak at hotmail.com Thu Jul 21 05:30:31 2005 From: tallpeak at hotmail.com (Aaron West) Date: Thu, 21 Jul 2005 05:30:31 -0700 Subject: SPUG: Fixing Cygwin broken links Message-ID: If you find your Cygwin links don't work (eg. some commands do nothing or get stuck in a loop): For some reason, my latest Cygwin install created nonworking links. So I converted each tiny file containing at the start to a real symlink. It's simple enough to write that I'm not sure it's worth posting, nor if anyone else has seen this same problem, but here it is. There's no error-checking; use at your own risk. 200 is arbitrary, and a bit large, but it seems reasonably safe to assume that a file starting with less than 200 bytes is supposed to be a symlink (not a regular file). $ cd / ; find . -xdev -name "*bin" -type d -exec sh -c 'echo {}; cd {}; fixlinks.pl' \; $ cat /usr/bin/fixlinks.pl #!perl while($filename = <*>) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filename); if ($size < 200 && (($mode & (S_IFREG | S_IFLNK)) == S_IFREG) ) { open FH, "<$filename"; $firstline = ; close FH; chomp $firstline; if ($firstline =~ /^\!\(.*)/) { print "ln -s $1 $filename\n"; unlink $filename; symlink $1, $filename; } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20050721/698cc272/attachment-0001.html From julesa at pcf.com Thu Jul 21 11:49:10 2005 From: julesa at pcf.com (Jules Agee) Date: Thu, 21 Jul 2005 11:49:10 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: Message-ID: <42DFEE26.30709@pcf.com> Atom Powers wrote: > I'm trying to write a script what will give me the host name ( from > DNS ) for whatever machine it is run on. The stumbling block is > getting the local IP address. http://search.cpan.org/~bluelines/Sys-HostIP-1.3.1/HostIP.pm -Jules From MichaelRWolf at att.net Thu Jul 21 12:11:27 2005 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Thu, 21 Jul 2005 12:11:27 -0700 Subject: SPUG: Fixing Cygwin broken links In-Reply-To: Message-ID: What are the S_* constants? How did you get them loaded? > if ($size < 200 && (($mode & (S_IFREG | S_IFLNK)) == S_IFREG) ) A DeMorgan equivalent should be: if ($size < 200 && $mode & S_IFREG ) But that doesn't seem to be saying what you claim that it's doing. From sthoenna at efn.org Thu Jul 21 13:58:02 2005 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Thu, 21 Jul 2005 13:58:02 -0700 Subject: SPUG: Fixing Cygwin broken links In-Reply-To: <20050721191142.8B01017793@x6.develooper.com> References: <20050721191142.8B01017793@x6.develooper.com> Message-ID: <20050721205802.GA2748@efn.org> On Thu, Jul 21, 2005 at 12:11:27PM -0700, Michael R. Wolf wrote: > What are the S_* constants? How did you get them loaded? > > > > > if ($size < 200 && (($mode & (S_IFREG | S_IFLNK)) == S_IFREG) ) > > A DeMorgan equivalent should be: > if ($size < 200 && $mode & S_IFREG ) > > But that doesn't seem to be saying what you claim that it's doing. & and | are bitwise, && and || are logical. From jbeasley at cardomain.com Thu Jul 21 15:34:07 2005 From: jbeasley at cardomain.com (Julien Beasley) Date: Thu, 21 Jul 2005 15:34:07 -0700 Subject: SPUG: OSCON and Career Opportunity Message-ID: Greetings SPUG users! I work at CarDomain.com, an automotive online community/e-tailer located next to south Lake Union. We are hiring smart and motivated Perl developers (w/ good understanding/experience in OOP) interested in joining a rapidly growing company. If anyone here is interested in opportunities with us (www.cardomain.com/jobs ), then please send your resume to jobs at cardomain.com. Also, our whole dev team is going down to the OSCON conference in another couple of weeks, so please stop by our booth if you happen to be there (or if you know someone else who might be interested, we offer a $1000 referral reward). Cheers, Julien Beasley -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20050721/2546ef16/attachment.html From creede at penguinsinthenight.com Thu Jul 21 16:33:20 2005 From: creede at penguinsinthenight.com (Creede Lambard) Date: Thu, 21 Jul 2005 16:33:20 -0700 Subject: SPUG: OSCON and Career Opportunity In-Reply-To: References: Message-ID: <20050721233319.GT3856@boris.penguinsinthenight.com> On Thu, Jul 21, 2005 at 03:34:07PM -0700, Julien Beasley wrote: > > > Greetings SPUG users! > > > > I work at CarDomain.com, an automotive online community/e-tailer located > next to south Lake Union. We are hiring smart and motivated Perl > developers (w/ good understanding/experience in OOP) interested in > joining a rapidly growing company. If anyone here is interested in > opportunities with us (www.cardomain.com/jobs > ), then please send your resume to > jobs at cardomain.com. Also, our whole dev team is going down to the OSCON > conference in another couple of weeks, so please stop by our booth if > you happen to be there (or if you know someone else who might be > interested, we offer a $1000 referral reward). > > > > Cheers, > > Julien Beasley > Does it help to mention your name? :) I put in some time at both Reynolds & Reynolds and Cobalt Group, if that makes a difference. -- =================================================================== * .~. ( : Creede Lambard : Never rush a miracle man. . / V \ . :------------------------: You get lousy miracles. /( )\ : creede at : --------------------------------^^-^^----: penguinsinthenight : Linux. Reliable and free. Pick any two. : dot com : =================================================================== -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20050721/368b245e/attachment.bin From tallpeak at hotmail.com Thu Jul 21 17:02:25 2005 From: tallpeak at hotmail.com (Aaron West) Date: Thu, 21 Jul 2005 17:02:25 -0700 Subject: SPUG: Fixing Cygwin broken links References: Message-ID: perldoc -f stat says "use Fcntl ':mode';" for those constants. Oops. I didn't do that. And I didn't use -w. I know, I'm bad. The expression apparently reduced to true, and it looks at all files under 200 bytes. $ perl -lwe 'use Fcntl ":mode"; $x=S_IFREG; print $x' 32768 $ perl -lwe '$mode=0; print +(($mode & (S_IFREG | S_IFLNK)) == S_IFREG)' Argument "S_IF^OO" isn't numeric in bitwise and (&) at -e line 1. Argument "S_IFREG" isn't numeric in numeric eq (==) at -e line 1. 1 S_IFREG is a string. S_IFREG | S_IFLNK is a bitwise or of two strings. Okay, I'll try to remember -w even for little "hacks". This is cleaner (though some warnings about unused variables from stat): $ cat ./fixlinks.pl #!perl -w $|=1; use Fcntl ':mode'; while($filename = <*>) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filename); if (defined $size && $size > 9 && $size < 200 && $mode & S_IFREG ) { unless (open FH, "<$filename") { print "Can't open $filename\n"; next; } $firstline = ; close FH; chomp $firstline; if ($firstline =~ /^\!\(.*)/) { print "ln -sf $1 $filename\n"; #inform the user what is effectively happening unlink $filename; symlink $1, $filename; } } } ----- Original Message ----- From: "Michael R. Wolf" To: "'Aaron West'" ; Sent: Thursday, July 21, 2005 12:11 PM Subject: RE: SPUG: Fixing Cygwin broken links > What are the S_* constants? How did you get them loaded? > > > >> if ($size < 200 && (($mode & (S_IFREG | S_IFLNK)) == S_IFREG) ) > > A DeMorgan equivalent should be: > if ($size < 200 && $mode & S_IFREG ) > > But that doesn't seem to be saying what you claim that it's doing. > > > > > From mike206 at gmail.com Thu Jul 21 17:34:46 2005 From: mike206 at gmail.com (mike) Date: Thu, 21 Jul 2005 17:34:46 -0700 Subject: SPUG: intrigued by obfuscation Message-ID: somebody's profile in the kwiki ya'll use had this on the signature: box% perl -e '( $ ,, $ ")=("a".."z")[0,-1]; print "sh", $ ","m\n";;";;"' shazam box% While I'm not all that new to perl , I am not familiar with these ,,'s and ;;'s . Could someone point me to some proper documentation? perldoc perlop only had .., which I already use frequently From tcaine at cac.washington.edu Thu Jul 21 18:26:32 2005 From: tcaine at cac.washington.edu (tcaine@cac.washington.edu) Date: Thu, 21 Jul 2005 18:26:32 -0700 (PDT) Subject: SPUG: intrigued by obfuscation In-Reply-To: References: Message-ID: ($ ,, $ ") is a list containing $, and $", the output field separator and the list seperator, respectively. The ;;'s are just extra line termination characters and can be removed to still produce "shazam". The last ";;" is a scalar being used in void context. -T On Thu, 21 Jul 2005, mike wrote: > somebody's profile in the kwiki ya'll use had this on the signature: > > > box% perl -e '( $ ,, $ ")=("a".."z")[0,-1]; print "sh", $ ","m\n";;";;"' > shazam > box% > > While I'm not all that new to perl , I am not familiar with these ,,'s > and ;;'s . > > Could someone point me to some proper documentation? > > perldoc perlop only had .., which I already use frequently > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > From tcaine at cac.washington.edu Thu Jul 21 19:04:09 2005 From: tcaine at cac.washington.edu (tcaine@cac.washington.edu) Date: Thu, 21 Jul 2005 19:04:09 -0700 (PDT) Subject: SPUG: kwiki problems Message-ID: I was going through the Kwiki restoring pages that have been defaced by BadPeople (tm) and came across a page that seems to be broken. I clicked on the SpugWikiAdmin link under LearningKwiki but it's an empty page. I'm not sure who to send mail to at this point but here's a link to the page that needs someone's attention. http://wiki.seattleperl.org/index.cgi?KwikiHelpIndex Thanks, Todd From andrew at sweger.net Thu Jul 21 19:17:27 2005 From: andrew at sweger.net (Andrew Sweger) Date: Thu, 21 Jul 2005 19:17:27 -0700 (PDT) Subject: SPUG: kwiki problems In-Reply-To: Message-ID: Alright! Thanks for going through and helping to police the wiki pages. The page you mention appears to have been wiped out completely. I have no idea what happened to the revision file for it. I'll try to find an original since it's from the stock installation. On Thu, 21 Jul 2005 tcaine at cac.washington.edu wrote: > I was going through the Kwiki restoring pages that have been defaced by > BadPeople (tm) and came across a page that seems to be broken. I clicked > on the SpugWikiAdmin link under LearningKwiki but it's an empty page. I'm > not sure who to send mail to at this point but here's a link to the page > that needs someone's attention. > > http://wiki.seattleperl.org/index.cgi?KwikiHelpIndex -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From andrew at sweger.net Thu Jul 21 22:41:16 2005 From: andrew at sweger.net (Andrew Sweger) Date: Thu, 21 Jul 2005 22:41:16 -0700 (PDT) Subject: SPUG: Lightning talks deadline extended Message-ID: >From MJD: Lightning Talks at the 2005 O'Reilly Open Source Convention Because the submissions process opened so late, I will continue to accept lightning talks submissions up to the last minute. To submit a talk proposal, please send your proposed title and an abstract of up to four sentences to osc-lt-2005-submit-perl at plover.com or contact me in person at OSCON. For more complete information, visit: http://perl.plover.com/lt/osc2005/ Thanks. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From haircut at gmail.com Thu Jul 21 23:43:02 2005 From: haircut at gmail.com (Adam Monsen) Date: Thu, 21 Jul 2005 23:43:02 -0700 Subject: SPUG: kwiki problems In-Reply-To: References: Message-ID: <9ebd65110507212343fe68eae@mail.gmail.com> Is there a way to only allow logged-in users to modify the wiki? Maybe this would help ease future maintenance. -- Adam Monsen http://adammonsen.com/ From MichaelRWolf at att.net Fri Jul 22 07:28:33 2005 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Fri, 22 Jul 2005 07:28:33 -0700 Subject: SPUG: Fixing Cygwin broken links In-Reply-To: Message-ID: > And I didn't use -w. I know, I'm bad. And just to be a bit safe (anal, possibly), I like to use an absolute path in my shebang line. #! /usr/bin/perl -w Something about horses and Troy.... :-) BTW -- I remember Damian talking (a few years ago in his ~damian/bin talk, originally given to SPUG, then later expanded at OSCON) about setting up a macro in vi (as an emacs user, myself, I don't remember the exact details) that inserted this shebang line for him. Personally, I haven't gotten lazy (the virtue) enough to create such a keybinding in emacs, but I do incant that magic. > $ perl -lwe 'use Fcntl ":mode"; $x=S_IFREG; print $x' > 32768 More obvious (to those who don't remember all their powers of 2) if printed as a binary mask.... |||| VVVV $ perl -lwe 'use Fcntl ":mode"; $x=S_IFREG; printf "%b", $x' 1000000000000000 Thanks for the example. I had forgotten (or didn't even know in the first place) that $mode includes the permission bits *AND* the file type bits. From jay at scherrer.com Fri Jul 22 08:36:26 2005 From: jay at scherrer.com (Jay Scherrer) Date: Fri, 22 Jul 2005 08:36:26 -0700 Subject: SPUG: kwiki problems In-Reply-To: <9ebd65110507212343fe68eae@mail.gmail.com> References: <9ebd65110507212343fe68eae@mail.gmail.com> Message-ID: <1122046587.3286.6.camel@gimly.scherco.local> On Thu, 2005-07-21 at 23:43 -0700, Adam Monsen wrote: > Is there a way to only allow logged-in users to modify the wiki? Maybe > this would help ease future maintenance. > Wouldn't it be cool if some how we were to implement a form of cvs or svn type of tracking? Authorizing only registered user's to login via their public ssh key. This would also allow a form of archiving and rollbacks. Or is this detrimental to the whole idea of wikidness ? Jay Scherrer From andrew at sweger.net Fri Jul 22 11:15:01 2005 From: andrew at sweger.net (Andrew Sweger) Date: Fri, 22 Jul 2005 11:15:01 -0700 (PDT) Subject: SPUG: kwiki problems In-Reply-To: <1122046587.3286.6.camel@gimly.scherco.local> Message-ID: On Fri, 22 Jul 2005, Jay Scherrer wrote: > On Thu, 2005-07-21 at 23:43 -0700, Adam Monsen wrote: > > Is there a way to only allow logged-in users to modify the wiki? Maybe > > this would help ease future maintenance. > > > Wouldn't it be cool if some how we were to implement a form of cvs or > svn type of tracking? Authorizing only registered user's to login via > their public ssh key. This would also allow a form of archiving and > rollbacks. Or is this detrimental to the whole idea of wikidness ? Well, the way Todd was able to fix the wiki was by rolling back the pages to previous revisions. The revisions are stored in RCS files which just happen to be the same way CVS stores files in its repository. So, we effectively have had this all along. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From andrew at sweger.net Fri Jul 22 11:19:19 2005 From: andrew at sweger.net (Andrew Sweger) Date: Fri, 22 Jul 2005 11:19:19 -0700 (PDT) Subject: SPUG: kwiki problems In-Reply-To: <9ebd65110507212343fe68eae@mail.gmail.com> Message-ID: On Thu, 21 Jul 2005, Adam Monsen wrote: > Is there a way to only allow logged-in users to modify the wiki? Maybe > this would help ease future maintenance. It goes counter to the philosophy of the Kwiki software design (as I understand it). It _can_ be done. But at the moment, it's more trouble to implement than I want to deal with. I'm considering MediaWiki. But that might be viewed as sacrilegious. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From LMedrano-Zaldivar at ciber.com Fri Jul 22 11:49:46 2005 From: LMedrano-Zaldivar at ciber.com (Medrano-Zaldivar, L E) Date: Fri, 22 Jul 2005 12:49:46 -0600 Subject: SPUG: out of topic Message-ID: <8FFDEE1FC17DFB4BAF050331C185449F40FFA2@srv-corp-exmb4.ciber.cbr.inc> Gang, I try to install Fedora Core 4 on Dell PowerEdge SC420 sever, but the I can not make it work the graphic install neither Xwindows. Any of you had this problem? I really appreciate all you suggestions and ideas. Thanks, Luis From bill at celestial.com Fri Jul 22 12:03:00 2005 From: bill at celestial.com (Bill Campbell) Date: Fri, 22 Jul 2005 12:03:00 -0700 Subject: SPUG: kwiki problems In-Reply-To: References: <9ebd65110507212343fe68eae@mail.gmail.com> Message-ID: <20050722190300.GA96114@alexis.mi.celestial.com> On Fri, Jul 22, 2005, Andrew Sweger wrote: >On Thu, 21 Jul 2005, Adam Monsen wrote: > >> Is there a way to only allow logged-in users to modify the wiki? Maybe >> this would help ease future maintenance. > >It goes counter to the philosophy of the Kwiki software design (as I >understand it). It _can_ be done. But at the moment, it's more trouble to >implement than I want to deal with. > >I'm considering MediaWiki. But that might be viewed as sacrilegious. Like using Zope/Plone for a perl group :-). Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.'' -- Doug Gwyn From sthoenna at efn.org Fri Jul 22 12:31:32 2005 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Fri, 22 Jul 2005 12:31:32 -0700 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: References: Message-ID: <20050722193132.GB3872@efn.org> On Wed, Jul 20, 2005 at 06:19:02PM -0700, Duane Blanchard wrote: > As I recall, I'll use the 'm' flag to hand the RE more than one > line, and '\s' should handle '\n'. Specifically, the //m flag just changes what ^ and $ match. The //s flag just changes what . matches. Either or both may be needed. From dblanchard at gmail.com Fri Jul 22 16:10:51 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Fri, 22 Jul 2005 16:10:51 -0700 Subject: SPUG: Reading a whole file into a scalar. In-Reply-To: <20050722193132.GB3872@efn.org> References: <20050722193132.GB3872@efn.org> Message-ID: Thanks, Like most of Perl, that makes sense, but isn't something I would realize on my own. D On 7/22/05, Yitzchak Scott-Thoennes wrote: > On Wed, Jul 20, 2005 at 06:19:02PM -0700, Duane Blanchard wrote: > > > As I recall, I'll use the 'm' flag to hand the RE more than one > > line, and '\s' should handle '\n'. > > Specifically, the //m flag just changes what ^ and $ match. The //s > flag just changes what . matches. Either or both may be needed. > -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From dblanchard at gmail.com Fri Jul 22 16:15:54 2005 From: dblanchard at gmail.com (Duane Blanchard) Date: Fri, 22 Jul 2005 16:15:54 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays Message-ID: Hi Spuggers, I'm working on a hairy data set for which I need a hash in which the values are arrays which each have as one of their elements an additional array. My assumption is that I will be OK using anonymous arrays, but before I stay up all night trying to figure out that my assumption is wrong, I thought I'd ask someone. Thanks, yet again, Duane -- Duane Blanchard 206.934.5873 There are 10 kinds of people in the world; those who know binary and those who don't. From james at banshee.com Fri Jul 22 16:27:43 2005 From: james at banshee.com (James Moore) Date: Fri, 22 Jul 2005 16:27:43 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays In-Reply-To: Message-ID: <200507222326.j6MNQFhe011129@server2.banshee.com> Not an answer to the question, but something compels me to recommend multiple readings of chapter 1, Advanced Perl Programming. Or at least it always takes _me_ multiple readings... - James From kahn at cpan.org Fri Jul 22 16:36:41 2005 From: kahn at cpan.org (Jeremy G. Kahn) Date: Fri, 22 Jul 2005 16:36:41 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays In-Reply-To: References: Message-ID: <42E18309.2090705@cpan.org> Hey Duane (*waves*): The trick is to think object-y. An array which has an array at each element is a 2-d array, or a Grid. So if the value of each hash key is a reference to a Grid, you're okay, right? $myhash{evens} = [ [0,2,4], [4,6,8] ]; $myhash{odds} = [ [1,3,5], [7,9,11] ]; then you can access it as $myhash{$odds}->[0][0] . cf `perldoc perlol`; `perldoc perldsc`, `perldoc perlref` and (probably what you'll want in the long run) `perldoc perlobj`. --jeremy Duane Blanchard wrote: >Hi Spuggers, > >I'm working on a hairy data set for which I need a hash in which the >values are arrays which each have as one of their elements an >additional array. My assumption is that I will be OK using anonymous >arrays, but before I stay up all night trying to figure out that my >assumption is wrong, I thought I'd ask someone. > >Thanks, yet again, > >Duane > > > From haircut at gmail.com Fri Jul 22 16:45:01 2005 From: haircut at gmail.com (Adam Monsen) Date: Fri, 22 Jul 2005 16:45:01 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays In-Reply-To: <42E18309.2090705@cpan.org> References: <42E18309.2090705@cpan.org> Message-ID: <9ebd65110507221645bded0af@mail.gmail.com> Good advice by all. Also, check out Data::Dumper, an invaluable tool at examining data structures of any kind. use Data::Dumper; $myhash{evens} = [ [0,2,4], [4,6,8] ]; print Dumper(\%myhash); # notice the backslash! prints out: $VAR1 = { 'evens' => [ [ 0, 2, 4 ], [ 4, 6, 8 ] ] }; There's also a cool replacement to Data::Dumper that prints out the actual variable name instead of just $VAR1, but I forget what the name of that module is. I suppose you can also use Data::Dumper->Dump(), but this module that I can't remember the name of does everything for you. -- Adam Monsen http://adammonsen.com/ From charles.e.derykus at boeing.com Fri Jul 22 16:47:27 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Fri, 22 Jul 2005 16:47:27 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays Message-ID: >I'm working on a hairy data set for which I need a hash in which the values are arrays which each have as one of their >elements an additional array. My assumption is that I will be OK using anonymous arrays, but before I stay up all night >trying to figure out that my assumption is wrong, I thought I'd ask someone. If you're worried about the anonymous arrays vaporizing... not to worry. They'll hang around for the life of the hash... HTH, -- Charles DeRykus From mike206 at gmail.com Fri Jul 22 17:03:41 2005 From: mike206 at gmail.com (mike) Date: Fri, 22 Jul 2005 17:03:41 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays In-Reply-To: <9ebd65110507221645bded0af@mail.gmail.com> References: <42E18309.2090705@cpan.org> <9ebd65110507221645bded0af@mail.gmail.com> Message-ID: apologies in advance for any duplicates of this message. is there any particular reason why you guys stick with the '$hash{key}' or '$array[x]' method instead of using references? Is it just a matter of preference? Using references forces you to 'caste' the reference as an array ( @{$ref} ) or a hash ( %{$ref} ) when using stuff like push or keys. Using actual arrays and hashes force you to \@array when passing to subroutines. Any other thoughs on this? On 7/22/05, Adam Monsen wrote: > Good advice by all. Also, check out Data::Dumper, an invaluable tool > at examining data structures of any kind. > > use Data::Dumper; > $myhash{evens} = [ [0,2,4], [4,6,8] ]; > print Dumper(\%myhash); # notice the backslash! > > prints out: > > $VAR1 = { > 'evens' => [ > [ > 0, > 2, > 4 > ], > [ > 4, > 6, > 8 > ] > ] > }; > > There's also a cool replacement to Data::Dumper that prints out the > actual variable name instead of just $VAR1, but I forget what the name > of that module is. I suppose you can also use Data::Dumper->Dump(), > but this module that I can't remember the name of does everything for > you. > > -- > Adam Monsen > http://adammonsen.com/ > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > From bri at ifokr.org Sat Jul 23 08:11:45 2005 From: bri at ifokr.org (Brian Hatch) Date: Sat, 23 Jul 2005 08:11:45 -0700 Subject: SPUG: Get the local IP address? In-Reply-To: References: <20050720221841.GA80583@alexis.mi.celestial.com> <20050720223538.GB81315@alexis.mi.celestial.com> Message-ID: <20050723151144.GK13740@ifokr.org> > I know. I was just hoping for a simpler solution. > Regex is so easy to get wrong... You could convert the following C code to perl, or just use it via $ipaddr=`ipaddr $INTERFACENAME`. It binds a socket to the interface and then uses that socket to get the address info for it. Should work on any linux, regardless of distro or version of ifconfig, because it doesn't parse anything. Haven't tried it on *BSD or others, but should work in theory. #include #include #include #include #include #include #include #include #include #include int main( int argc, char **argv ) { struct ifconf ifc; char *interface; char buff[BUFSIZ]; int sock, iface, num; struct ifreq *ifr=NULL; if ( argc == 1 ) { interface = "eth0"; } else if ( argc == 2 ) { interface = argv[1]; } else { fprintf(stderr, "Usage: %s [interface_name]\n", argv[0]); fprintf(stderr, "Usage: %s [interface_name]\n", argv[0]); fprintf(stderr, "e.g. %s eth0:1\n", argv[0]); fprintf(stderr, "if no interface specified, eth0 assumed.\n"); exit(1); } sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); ifc.ifc_len = sizeof(buff); ifc.ifc_buf = buff; ioctl(sock, SIOCGIFCONF, &ifc); ifr = ifc.ifc_req; num = ifc.ifc_len / sizeof(struct ifreq); /* Loop through all interfaces. */ for ( ; iface References: Message-ID: <20050723151530.GL13740@ifokr.org> > This script is going to run only in a controlled situation. > It's part of my system imaging process, which requires that the system > is registered in DNS by the IP of the network card which is in use, > and there will be only one NIC in use during the build process. Which > in turn gets it's IP from reserved DHCP. > > So, even though it may have multiple interfaces it will have only one > address assigned, and that address will have only one hostname > associated with it. I need that hostname so I can set the hostname of > the system during the build. Well, if you've got a box that houses the packages while the build is occuring, slap a program (cgi, or just a daemon vi xinetd, etc) to tell it who it is. It just needs to check the client addr of the socket (which is your being-built box) and that's guarenteed to be the IP address. ;-) -- Brian Hatch You're having delusions Systems and of grandure again. Security Engineer Well, if you're going to http://www.ifokr.org/bri/ have delusions, might as well be the satisfing kind. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://mail.pm.org/pipermail/spug-list/attachments/20050723/c87c971d/attachment.bin From iheffner at gmail.com Sat Jul 23 23:56:55 2005 From: iheffner at gmail.com (Ivan Heffner) Date: Sat, 23 Jul 2005 23:56:55 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays In-Reply-To: References: Message-ID: Duane, You seem to be expressing some concerns about the persistence of anonymous arrays. You can sleep easy knowing that anonymous arrays can persist just as long, sometimes longer, than named arrays. As long as Perl thinks there is at least one reference to a data structure, be it a simple scalar or a complex multi-dimensional array of hashes of array of arrays, that data will persist. That means as long as you have your hash key that points to an anonymous array, that array will persist, as well as any anonymous arrays in it If you have not seen it, I recommend picking up a copy of Randall Schwartz's book Learning Perl's Objects, References, and Modules. It's a great bridge between Learning Perland Advanced Perl Programming . Ivan On 7/22/05, Duane Blanchard wrote: > > Hi Spuggers, > > I'm working on a hairy data set for which I need a hash in which the > values are arrays which each have as one of their elements an > additional array. My assumption is that I will be OK using anonymous > arrays, but before I stay up all night trying to figure out that my > assumption is wrong, I thought I'd ask someone. > > Thanks, yet again, > > Duane > > -- > Duane Blanchard > 206.934.5873 > > There are 10 kinds of people in the world; > those who know binary and those who don't. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med > WEB PAGE: http://seattleperl.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20050724/517c7c64/attachment.html From sthoenna at efn.org Sun Jul 24 02:01:00 2005 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Sun, 24 Jul 2005 02:01:00 -0700 Subject: SPUG: In over my head with hashes of arrays of arrays In-Reply-To: <9ebd65110507221645bded0af@mail.gmail.com> References: <42E18309.2090705@cpan.org> <9ebd65110507221645bded0af@mail.gmail.com> Message-ID: <20050724090100.GA3964@efn.org> On Fri, Jul 22, 2005 at 04:45:01PM -0700, Adam Monsen wrote: > Good advice by all. Also, check out Data::Dumper, an invaluable tool > at examining data structures of any kind. > > use Data::Dumper; > $myhash{evens} = [ [0,2,4], [4,6,8] ]; > print Dumper(\%myhash); # notice the backslash! > > prints out: > > $VAR1 = { > 'evens' => [ > [ > 0, > 2, > 4 > ], > [ > 4, > 6, > 8 > ] > ] > }; > > There's also a cool replacement to Data::Dumper that prints out the > actual variable name instead of just $VAR1, but I forget what the name > of that module is. I suppose you can also use Data::Dumper->Dump(), > but this module that I can't remember the name of does everything for > you. That would be Data::Dumper::Simple, I think. Note that it doesn't do anything Data::Dumper can't; in fact it's just a source filter that comes up with the proper Data::Dumper invocation for you. Also note that source filters don't always work and IMO are best avoided. From james at banshee.com Mon Jul 25 11:58:50 2005 From: james at banshee.com (James Moore) Date: Mon, 25 Jul 2005 11:58:50 -0700 Subject: SPUG: Looking for a schedule module for calendar/time-of-day checking Message-ID: <200507251858.j6PIwSNL022410@server2.banshee.com> I have to think someone's already written this, but so far I haven't found it on CPAN. I need a module that returns true if a given time fits into a schedule, where a schedule could look something roughly like: MoWeFr 10a-2p or 29June 8a-5p I don't care what the format of the schedule is; happy to use just about anything that is vaguely legible to a human. I need something that can do combinations of: Day of the week Time of day Fixed dates Xth Fooday of the month (3rd Fridays, first Mondays,.) Anyone know of such a beast, or do I need to write it myself? - James From james at banshee.com Mon Jul 25 12:07:45 2005 From: james at banshee.com (James Moore) Date: Mon, 25 Jul 2005 12:07:45 -0700 Subject: SPUG: Looking for a schedule module for calendar/time-of-daychecking In-Reply-To: <200507251858.j6PIwSNL022410@server2.banshee.com> Message-ID: <200507251907.j6PJ7Nbq022497@server2.banshee.com> Looks like I mailed just a bit too soon. Something that uses the RFC2445 format seems to be the right choice, and Calendar::Schedule might do the job for me. - James From charles.e.derykus at boeing.com Mon Jul 25 12:13:43 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Mon, 25 Jul 2005 12:13:43 -0700 Subject: SPUG: Looking for a schedule module for calendar/time-of-daychecking Message-ID: >I have to think someone's already written this, but so far I haven't found it on CPAN. >I need a module that returns true if a given time fits into a schedule, where a schedule could look something roughly >like: >MoWeFr 10a-2p >or >29June 8a-5p >I don't care what the format of the schedule is; happy to use just about anything that is vaguely legible to a human. >I need something that can do combinations of: >Day of the week >Time of day >Fixed dates >Xth Fooday of the month (3rd Fridays, first Mondays,.) >Anyone know of such a beast, or do I need to write it myself? You might take a look at Date::Manip which can parse dates in arbitary format, take deltas, sing, dance... However, I don't know how far the "arbitaray allowance" will stretch. Your "MoWeFr" May well gag it. Probably still worth checking. It's the biggest (and slowest) and arguably the most versatile of the Date modules though. Date::Calc is also very big and capable too. HTH, -- Charles From cmauch at gmail.com Sat Jul 30 20:17:52 2005 From: cmauch at gmail.com (Charles Mauch) Date: Sat, 30 Jul 2005 20:17:52 -0700 Subject: SPUG: howdy! (and i've got a question) Message-ID: <20050731031751.GA4748@redbox.mauch.name> I'm new to the list, thought I'd introduce myself and plunge in with a quick perl question. I'm Charles.. I'm pretty active in TACLUG down here in Tacoma, and have been using linux and unix systems for about 10 years. I should probably stress the USE part though. It's only recently that I've been trying to cross over and writing any code with any weight beyond a few lines of bash or perl. Anyway, my question is this. I'm working on a Email Filtering script that replaces my procmail recipes wholesale. Right now - it works, but with some caveats. (IE, it has bugs). It's working enough that I'm using to handle all of my email though. If anybody wants to poke at it, it lives at http://charles.mauch.name/mutt-links/audit.pl.txt for now. ... One of the things that I've been trying to do is to harvest url's passing through the script, and stuff them into a category in my firefox bookmarks. I'm currently simply ripping out any word in the email that starts with http:: (which seems to work pretty reliably) and I'm currently logging these tidbits into a ascii text file. The next step, which I started working on today was to use Netscape::Bookmarks to manipulate an existing bookmarks file. It doesn't seem to work as advertised. It reports.. Can't call method "recurse" on an undefined value ... and when I attempt to install URI::Collection, I get a similar error. See: http://www.nntp.perl.org/group/perl.cpan.testers/209604 Does anybody have an idea how to work around this? I'd like to keep it simple and continue to use perl modules where I can. Suggestions as to alternative methods of dealing with a bookmarks file appreciated. -- Take it easy Charles Mauch, [cmauch at gmail.com], Big Time Glue Eater Every message PGP or S/MIME signed to verify authenticity. ------------------------------------------------------------- Playing "I Want To The Boy" by The White Stripes (Elephant) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20050731/89d09e33/attachment.bin From charles.e.derykus at boeing.com Sat Jul 30 22:35:05 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Sat, 30 Jul 2005 22:35:05 -0700 Subject: SPUG: howdy! (and i've got a question) Message-ID: Hm, you might try posting a short snippet of your code. Show the portions that provide some context for the fatal error you got. Rgds, -- Charles DeRykus -----Original Message----- From: Charles Mauch [mailto:cmauch at gmail.com] Sent: Saturday, July 30, 2005 8:18 PM To: spug-list at pm.org Subject: SPUG: howdy! (and i've got a question) I'm new to the list, thought I'd introduce myself and plunge in with a quick perl question. I'm Charles.. I'm pretty active in TACLUG down here in Tacoma, and have been using linux and unix systems for about 10 years. I should probably stress the USE part though. It's only recently that I've been trying to cross over and writing any code with any weight beyond a few lines of bash or perl. Anyway, my question is this. I'm working on a Email Filtering script that replaces my procmail recipes wholesale. Right now - it works, but with some caveats. (IE, it has bugs). It's working enough that I'm using to handle all of my email though. If anybody wants to poke at it, it lives at http://charles.mauch.name/mutt-links/audit.pl.txt for now. ... One of the things that I've been trying to do is to harvest url's passing through the script, and stuff them into a category in my firefox bookmarks. I'm currently simply ripping out any word in the email that starts with http:: (which seems to work pretty reliably) and I'm currently logging these tidbits into a ascii text file. The next step, which I started working on today was to use Netscape::Bookmarks to manipulate an existing bookmarks file. It doesn't seem to work as advertised. It reports.. Can't call method "recurse" on an undefined value ... and when I attempt to install URI::Collection, I get a similar error. See: http://www.nntp.perl.org/group/perl.cpan.testers/209604 Does anybody have an idea how to work around this? I'd like to keep it simple and continue to use perl modules where I can. Suggestions as to alternative methods of dealing with a bookmarks file appreciated. -- Take it easy Charles Mauch, [cmauch at gmail.com], Big Time Glue Eater Every message PGP or S/MIME signed to verify authenticity. ------------------------------------------------------------- Playing "I Want To The Boy" by The White Stripes (Elephant) From andrew at sweger.net Sun Jul 31 18:44:20 2005 From: andrew at sweger.net (Andrew Sweger) Date: Sun, 31 Jul 2005 18:44:20 -0700 (PDT) Subject: SPUG: howdy! (and i've got a question) In-Reply-To: <20050731031751.GA4748@redbox.mauch.name> Message-ID: On Sat, 30 Jul 2005, Charles Mauch wrote: > The next step, which I started working on today was to use > Netscape::Bookmarks to manipulate an existing bookmarks file. > > It doesn't seem to work as advertised. It reports.. > > Can't call method "recurse" on an undefined value ... Did you "use Netscape::Bookmarks"? -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From andrew at sweger.net Sun Jul 31 18:45:42 2005 From: andrew at sweger.net (Andrew Sweger) Date: Sun, 31 Jul 2005 18:45:42 -0700 (PDT) Subject: SPUG: howdy! (and i've got a question) In-Reply-To: <20050731031751.GA4748@redbox.mauch.name> Message-ID: On Sat, 30 Jul 2005, Charles Mauch wrote: > Anyway, my question is this. Wait, wait, wait. Just wait a moment. Did you "use strict"? Hmmm. Or warnings? *sigh* ;) -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From cmauch at gmail.com Sun Jul 31 19:37:05 2005 From: cmauch at gmail.com (Charles Mauch) Date: Sun, 31 Jul 2005 19:37:05 -0700 Subject: SPUG: howdy! (and i've got a question) In-Reply-To: References: <20050731031751.GA4748@redbox.mauch.name> Message-ID: <20050801023705.GA31193@redbox.mauch.name> >> The next step, which I started working on today was to use >> Netscape::Bookmarks to manipulate an existing bookmarks file. >> It doesn't seem to work as advertised. It reports.. >> Can't call method "recurse" on an undefined value ... > > Did you "use Netscape::Bookmarks"? Yeah, I'll paste some sample code I was trying to use. I'm still working on this problem, but I think I found a better solution in my workaround. I was able to work with XML::XBEL to stash my boomkmark data. XBEL = XML Bookmark Exchange Language. I then simply have firefox import this data on a regular basis. It looks like there are a bunch of useful little tools to play with data in this format too. For example, I can export my firefox bookmarks (or a category thereof), and have them automatically sync up to wordpress for publication on the web. Here is my original perl snippet which attempted to simply add a bookmark to a sample blank bookmark file. It never worked. ,----[ makeabookmark.pl ] | #!/usr/bin/perl | use Netscape::Bookmarks | my $now = "A date"; | my $address = "http://www.perl.org"; | my $username = "Charles Mauch"; | my $title = "Link : from $username at $now"; | my $description = "Link harvested from email from $username"; | my $bookmarks_file = "$ENV{HOME}/testbook.html"; | | my $bookmarks = Netscape::Bookmarks->new($bookmarks_file); | my $link = new Netscape::Bookmarks::Link { | TITLE => $title, | DESCRIPTION => $description, | HREF => 'http://www.perl.org', | ADD_DATE => $epochtime, | LAST_VISIT => $epochtime, | LAST_MODIFIED => $epochtime, | ALIAS_ID => 4 | }; | | $bookmarks->add($link); | print $link->as_string; `---- This snippet results in: Can't call method "add" on an undefined value at ./makeabookmark.pl line 23. By removing the $bookmarks->add($link);, I can print out the link itself, but it doesn't provide the rest of the 'wrapper' material that defines a bookmark file. A similar method "works" with XML:XBEL. So I might be making an error, but if it works elsewhere I figured it might not be me. I wanted to get "some output", and then start expanding. I never got that far. This doesn't actually attempt to write to any files, just print out a properly formatted bookmark string inside a "bookmark" file. I thought it might be a problem with the modules/cpan on my own machine, and copied this script to a remote redhat box and installed Netscape::Bookmarks from cpan. Same results. This isn't a huge issue for me after discovering XML::XBEL, but it might be nice to have this work properly at some poing. -- Take it easy Charles Mauch, [cmauch at gmail.com], Big Time Glue Eater Every message PGP or S/MIME signed to verify authenticity. ------------------------------------------------------------- Playing "Hash Pipe" by Weezer (Weezer (Green Album)) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20050801/0096b4fb/attachment.bin From cmauch at gmail.com Sun Jul 31 19:42:43 2005 From: cmauch at gmail.com (Charles Mauch) Date: Sun, 31 Jul 2005 19:42:43 -0700 Subject: SPUG: (no subject) In-Reply-To: References: <20050731031751.GA4748@redbox.mauch.name> Message-ID: <20050801024243.GB31193@redbox.mauch.name> >> Anyway, my question is this. > > Wait, wait, wait. Just wait a moment. > > Did you "use strict"? Hmmm. Or warnings? *sigh* When testing, I usually "use diagnostics". I should probably start using strict though :) -- Take it easy Charles Mauch, [cmauch at gmail.com], Big Time Glue Eater Every message PGP or S/MIME signed to verify authenticity. ------------------------------------------------------------- Playing "Checkpoint Syrup" by Magic Firesheep (Singles) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20050801/e7e394b9/attachment.bin From tim at consultix-inc.com Sun Jul 31 19:59:21 2005 From: tim at consultix-inc.com (Tim Maher) Date: Sun, 31 Jul 2005 19:59:21 -0700 Subject: SPUG: howdy! (and i've got a question) In-Reply-To: <20050801023705.GA31193@redbox.mauch.name> References: <20050731031751.GA4748@redbox.mauch.name> <20050801023705.GA31193@redbox.mauch.name> Message-ID: <20050801025921.GA12726@jumpy.consultix-inc.com> On Sun, Jul 31, 2005 at 07:37:05PM -0700, Charles Mauch wrote: > | #!/usr/bin/perl > | use Netscape::Bookmarks Terminal comma missing at end of above line! -Tim *--------------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Fall, 2005 book: "Minimal Perl for UNIX/Linux People" | | See http://minimalperl.com for details, ordering, and email-list signup | *--------------------------------------------------------------------------* From krahnj at telus.net Sun Jul 31 20:13:01 2005 From: krahnj at telus.net (John W. Krahn) Date: Sun, 31 Jul 2005 20:13:01 -0700 Subject: SPUG: howdy! (and i've got a question) In-Reply-To: <20050801025921.GA12726@jumpy.consultix-inc.com> References: <20050731031751.GA4748@redbox.mauch.name> <20050801023705.GA31193@redbox.mauch.name> <20050801025921.GA12726@jumpy.consultix-inc.com> Message-ID: <42ED933D.5000401@telus.net> Tim Maher wrote: > On Sun, Jul 31, 2005 at 07:37:05PM -0700, Charles Mauch wrote: >>| #!/usr/bin/perl >>| use Netscape::Bookmarks > > Terminal comma missing at end of above line! What is a "Terminal comma"? John -- use Perl; program fulfillment From tim at consultix-inc.com Sun Jul 31 20:56:30 2005 From: tim at consultix-inc.com (Tim Maher) Date: Sun, 31 Jul 2005 20:56:30 -0700 Subject: SPUG: howdy! (and i've got a question) In-Reply-To: <42ED933D.5000401@telus.net> References: <20050731031751.GA4748@redbox.mauch.name> <20050801023705.GA31193@redbox.mauch.name> <20050801025921.GA12726@jumpy.consultix-inc.com> <42ED933D.5000401@telus.net> Message-ID: <20050801035630.GA13015@jumpy.consultix-inc.com> On Sun, Jul 31, 2005 at 08:13:01PM -0700, John W. Krahn wrote: > Tim Maher wrote: > > On Sun, Jul 31, 2005 at 07:37:05PM -0700, Charles Mauch wrote: > >>| #!/usr/bin/perl > >>| use Netscape::Bookmarks > > > > Terminal comma missing at end of above line! > > What is a "Terminal comma"? > > John No reason for alarm; it's not like a terminal coma! 8-} But I'm sorry to have misled you, when of course I actually meant to refer to a terminal (i.e., at the end of the line) *semicolon*. (I'm actually editing some medical documents at the moment, which may have something to do with this slip!) *--------------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Fall, 2005 book: "Minimal Perl for UNIX/Linux People" | | See http://minimalperl.com for details, ordering, and email-list signup | *--------------------------------------------------------------------------* From dora at namosi.com Sun Jul 31 20:59:22 2005 From: dora at namosi.com (Dora Choi) Date: Sun, 31 Jul 2005 20:59:22 -0700 (PDT) Subject: SPUG: howdy! (and i've got a question) In-Reply-To: <20050801035630.GA13015@jumpy.consultix-inc.com> Message-ID: On Sun, 31 Jul 2005, Tim Maher wrote: > (I'm actually editing some medical documents at the moment, Didn't like the diagnosis/test results? ;-P From andrew at sweger.net Sun Jul 31 21:45:09 2005 From: andrew at sweger.net (Andrew Sweger) Date: Sun, 31 Jul 2005 21:45:09 -0700 (PDT) Subject: SPUG: (no subject) In-Reply-To: <20050801024243.GB31193@redbox.mauch.name> Message-ID: On Sun, 31 Jul 2005, Charles Mauch wrote: > > >> Anyway, my question is this. > > > > Wait, wait, wait. Just wait a moment. > > > > Did you "use strict"? Hmmm. Or warnings? *sigh* > > When testing, I usually "use diagnostics". I should probably start using > strict though :) The diagnostics pragma is not the same as strict. You generally _always_ want to use strict (and then disable various amounts of strictness in limited scopes as needed). -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From charles.e.derykus at boeing.com Sun Jul 31 22:22:05 2005 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Sun, 31 Jul 2005 22:22:05 -0700 Subject: SPUG: howdy! (and i've got a question) Message-ID: > ,----[ makeabookmark.pl ] > | #!/usr/bin/perl > | use Netscape::Bookmarks > | my $now = "A date"; > | my $address = "http://www.perl.org"; > | my $username = "Charles Mauch"; > | my $title = "Link : from $username at $now"; my $description = "Link > | harvested from email from $username"; my $bookmarks_file = > | "$ENV{HOME}/testbook.html"; > | > | my $bookmarks = Netscape::Bookmarks->new($bookmarks_file) or die "couldn't find/open $bookmarks_file"; #| just in case.... The constructor probably returns undef and so the bookmarks object will have a short, painful life ...:) > | my $link = new Netscape::Bookmarks::Link { > | TITLE => $title, > | DESCRIPTION => $description, > | HREF => 'http://www.perl.org', > | ADD_DATE => $epochtime, > | LAST_VISIT => $epochtime, > | LAST_MODIFIED => $epochtime, > | ALIAS_ID => 4 > | }; > | > | $bookmarks->add($link); > | print $link->as_string; > `---- > This snippet results in: > Can't call method "add" on an undefined value at ./makeabookmark.pl line 23. > ... -- Charles DeRykus From sthoenna at efn.org Sun Jul 31 22:30:56 2005 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Sun, 31 Jul 2005 22:30:56 -0700 Subject: SPUG: howdy! (and i've got a question) In-Reply-To: References: Message-ID: <20050801053056.GA1792@efn.org> On Sun, Jul 31, 2005 at 10:22:05PM -0700, DeRykus, Charles E wrote: > > > > ,----[ makeabookmark.pl ] > > | #!/usr/bin/perl > > | use Netscape::Bookmarks > > | my $now = "A date"; Now there's a lovely case for "use strict;". That's parsed as use Netscape::Bookmarks my $now = "A date"; which is more or less: BEGIN { require Netscape::Bookmarks; Netscape::Bookmarks::->import(my $now = "A date"); } so the missing semicolon doesn't throw an error, but prevents $now from being defined outside the implicit BEGIN; you do get a "Use of uninitialized value" when you try to use $now later under warnings/diagnostics, but with use strict it becomes a fatal error. > > | my $address = "http://www.perl.org"; > > | my $username = "Charles Mauch"; > > | my $title = "Link : from $username at $now"; my $description = "Link > > > | harvested from email from $username"; my $bookmarks_file = > > | "$ENV{HOME}/testbook.html"; > > > > | > > | my $bookmarks = Netscape::Bookmarks->new($bookmarks_file) > or die "couldn't find/open $bookmarks_file"; #| just in > case.... > > The constructor probably returns undef and so the bookmarks object > will have a short, painful life ...:) I'd add $! just in case the constructor leaves it set to something diagnostically useful.