From ryan2 at webrocket.net Thu Sep 2 17:16:18 1999 From: ryan2 at webrocket.net (Ryan Forsythe) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Perl classes References: <19990831185624.21801.rocketmail@web112.yahoomail.com> <87d7w3hc1h.fsf@ralf.serv.net> Message-ID: <37CEF732.B14B016@webrocket.net> i was wondering if anyone has taken the coninuing ed. classes at BCC about Perl? are they worth the $295, or would i be better off continuing the beating-my-head-against-the-camel-book technique? or are there more worthy classes somewhere else? --ryan - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From fen_land at hotmail.com Thu Sep 2 17:23:29 1999 From: fen_land at hotmail.com (S ED) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Perl classes Message-ID: <19990902222329.41924.qmail@hotmail.com> Hi Ryan- I took Perl Programming through continuing education at BCC. It was more than $295 I think, but I assume we are talking about the same class. I have mixed feelings about the class. It was not hands-on at all. Lame. There was homework, which I had fun trying and occasionally failing at. The value I got from the class was the repetition of things that I was reading and trying to get a grasp on. I would not say that I did not learn anything. But I wish I had read the description better and fully understood that it was not hands on. Let me tell you, listening to 3 hours at a time of Perl is sometimes tedious, depending on the subject. If you can find a hands on class I would recommend you go for that. For a cheaper Perl class, the BCC class adequate I suppose. I found that the homework did provoke me to ask some good questions of my personal Perl advisor - the lately-silent Andrew. I believe I got a nicely bound, orange covered book of all the slides (yes this a PowerPoint dominated presentation). I think I got the O'Reilly Perl Programming, although the class was targeted towards one of those Perl in 2 week type books. In fairness, the Perl in 2 week type book is good for the programming illiterate - it defines EVERYTHING. The instructor was a good public speaker. Samantha ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From azurite at uswest.net Fri Sep 3 20:36:29 1999 From: azurite at uswest.net (Kathy) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Perl classes, credit courses at community colleges References: <19990831185624.21801.rocketmail@web112.yahoomail.com> <87d7w3hc1h.fsf@ralf.serv.net> <37CEF732.B14B016@webrocket.net> Message-ID: <37D0779D.3419F58@uswest.net> Try some of the credit courses at the various community colleges, they are cheaper, cover more material, graded, and since the course is spread out over 10 or more weeks you can work at home for a bit, and then go to the next class with your questions. The only problem is if you can find a credit course scheduled for when you need it. That takes luck, or a lot of people asking that the community college add it. Note to Samantha fen_land@hotmail.com How can any programming class not be hands on? In a standard college setting class time is only suppose to be 1/3 or less of the actual time you spend studying a subject, the other 2/3 are the practice you do at home. It's easy to set up Perl at home, or you may have computer access through the school. Personally, I'd rather work on labs at home and later check it with the instructor, than pay someone to watch me type. As for continuing education courses, the classes are trying to appeal to as general an audience as possible since the classes are self supporting or even profitable for the community colleges. The credit course are for those who are determined to do programming. Washington State could do a lot better in the number and quality of the course it offers its residents. Good Luck Ryan Forsythe wrote: > i was wondering if anyone has taken the coninuing ed. classes at BCC > about Perl? are they worth the $295, or would i be better off > continuing the beating-my-head-against-the-camel-book technique? or are > there more worthy classes somewhere else? > > --ryan > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Sep 2 21:54:45 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Re: CONSULTIX Perl Classes In-Reply-To: <19990902222329.41924.qmail@hotmail.com> from "S ED" at Sep 2, 99 10:23:29 pm Message-ID: <199909030254.TAA24180@consultix.wa.com> >> Message submitted at: Thu Sep 2 19:54:45 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 4760 See below for comments from a recent student on Perl Training from my company, which many clients have found to be worthwhile! -Tim Maher *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |CLASSES: Shell+Utils: 8/23-27; Perl: 8/30-9/1; Perl Modules: 9/2;| *==================================================================* > >Hi, > >I am looking for feedback on Consultix, Inc.'s Perl Programming >class in Kirkland, WA. I highly recommend Consultix's perl programming course. I had been studying perl for a year before I took the class and had written several major web cgi-bin applications. I found that Tim's class did a lot to firm up my understanding of the language. Tim didn't know this, but during the course I had an open telnet session to my linux server at home and I compared my "self taught" techniques, to those presented in the class. I still use the class workbook for a reference. It sits right next to the camel and cookbook. Tim's class is a lot more than just lecture. You will find yourself challenged each day to put into practice, via lab work, the concepts covered in each session. Tim's class moved me out of the realm of "type this, and it works" to understanding *how* things work. I have moved on to working with objects, and database programming. I'm now doing things in perl that my co-workers call "magic". If I can only nail down regular expressions - I would be in perl heaven. (I have bought the "owl" book, now all I have to do is read it!) Hey Tim, how about a regex class! Something with a more depth than what was already covered in the perl class. {Tim comments: we now have a one-day Advanced Pattern Matching class, which is taught in the same week as our 3-day Intro class} Tell your boss to send you to the class! It's a good investment. _,'| _.-''``-...___..--'; /, \'. _..-' , ,--...--''' < \ .`--''' ` /| William Julien moonbeam@catmanor.com `-,;' ; ; ; http://www.catmanor.com/moonbeam/ __...--'' __...--_..' .;.' vi is my shepherd; i shall not font. (,__....----''' (,..--'' perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' According to S ED: > > Hi Ryan- > > I took Perl Programming through continuing education at BCC. It was more > than $295 I think, but I assume we are talking about the same class. > > I have mixed feelings about the class. It was not hands-on at all. Lame. > There was homework, which I had fun trying and occasionally failing at. The > value I got from the class was the repetition of things that I was reading > and trying to get a grasp on. > > I would not say that I did not learn anything. But I wish I had read the > description better and fully understood that it was not hands on. Let me > tell you, listening to 3 hours at a time of Perl is sometimes tedious, > depending on the subject. > > If you can find a hands on class I would recommend you go for that. For a > cheaper Perl class, the BCC class adequate I suppose. I found that the > homework did provoke me to ask some good questions of my personal Perl > advisor - the lately-silent Andrew. > > I believe I got a nicely bound, orange covered book of all the slides (yes > this a PowerPoint dominated presentation). I think I got the O'Reilly Perl > Programming, although the class was targeted towards one of those Perl in 2 > week type books. In fairness, the Perl in 2 week type book is good for the > programming illiterate - it defines EVERYTHING. > > The instructor was a good public speaker. > > Samantha > > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > > *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |CLASSES: Shell+Utils: 8/23-27; Perl: 8/30-9/1; Perl Modules: 9/2;| *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Sep 2 22:14:11 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Perl classes, credit courses at community colleges In-Reply-To: <37D0779D.3419F58@uswest.net> from "Kathy" at Sep 3, 99 06:36:29 pm Message-ID: <199909030314.UAA24298@consultix.wa.com> >> Message submitted at: Thu Sep 2 20:14:11 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2379 According to Kathy: > > Try some of the credit courses at the various community colleges, they are > cheaper, cover more material, graded, and since the course is spread out over > 10 or more weeks you can work at home for a bit, and then go to the next class > with your questions. > > Note to Samantha fen_land@hotmail.com > How can any programming class not be hands on? In a standard college > setting class time is only suppose to be 1/3 or less of the actual time you > spend studying a subject, the other 2/3 are the practice you do at home. It's > easy to set up Perl at home, or you may have computer access through the > school. > > Personally, I'd rather work on labs at home and later check it with the > instructor, than pay someone to watch me type. Sounds to me like you don't appreciate the value of having an experienced instructor on hand at the actual time when you are making your mistakes! In many cases, an instructor "looking over your shoulder" can explain that a perplexing error message is an indication that the program is missing a comma or a curly brace, and in so doing save the student much frustration and wasted time, while still giving the student the benefit of learning the syntax lesson. I didn't actually count the number of times I spotted this type of error in the work of my Perl students this week, but I'd guess it was averaging 3 errors per-day per-student on Monday, tapering off to 1/2 by today. (In fact, several of the students taking this week's class are now subscribers to this list, so they might want to tell you themselves how they feel about instructor-led classes vs. other modes of presentation!) As an educator, I know that different people have different learning styles and different needs, and will readily admit that no single approach is best for everybody; but there's a reason why instructor-led classes are so popular with corporate America -- they're worth the money! 8=} *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |CLASSES: Shell+Utils: 8/23-27; Perl: 8/30-9/1; Perl Modules: 9/2;| *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From jshaffer at chronology.com Fri Sep 3 09:16:53 1999 From: jshaffer at chronology.com (Jamie Shaffer) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Win32, use Cwd, and $ENV{PWD} References: <19990831185624.21801.rocketmail@web112.yahoomail.com> <87d7w3hc1h.fsf@ralf.serv.net> Message-ID: <37CFD855.7A682467@chronology.com> What's the difference between using Cwd to get the getCwd() function and using Win32? My scripts need to run on several platforms, so I 'use Cwd;' and make all of my code the same. I don't have Win32.pm installed so I can't run a test...could somebody tell me what difference I would see? Thanks! --Hey, I'm no longer just a lurker! ;) Ken McGlothlen wrote: > Stuart Poulin writes: > > | This is a shame. On Unix I use to use Cwd; and $ENV{PWD} to track the > | current directory. Doesn't seem to work on NT or Windows 98. > > No, it sure doesn't. However, you can use the following: > > #!/perl/bin/perl > # Teeny code fragment. > > use Win32; > > local( $currentdir ) = Win32::GetCwd(); > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address -- __________________________________________________ Jamie Shaffer Chronology Corporation jshaffer@chronology.com 14715 NE 95th Street www.chronology.com Redmond, WA 98052 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mcglk at serv.net Fri Sep 3 12:16:20 1999 From: mcglk at serv.net (Ken McGlothlen) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Win32, use Cwd, and $ENV{PWD} In-Reply-To: jshaffer@chronology.com's message of "Fri, 03 Sep 1999 07:16:53 -0700" References: <19990831185624.21801.rocketmail@web112.yahoomail.com> <87d7w3hc1h.fsf@ralf.serv.net> <37CFD855.7A682467@chronology.com> Message-ID: <87u2pbsyor.fsf@ralf.serv.net> jshaffer@chronology.com (Jamie Shaffer) writes: | What's the difference between using Cwd to get the getCwd() function and | using Win32? Well, not much if you're on Win32. If portability is your concern, then use Cwd; is definitely what you want. If you look at the Cwd.pm module, you'll find the following tidbit: sub _win32_cwd { $ENV{'PWD'} = Win32::GetCwd(); $ENV{'PWD'} =~ s:\\:/:g ; return $ENV{'PWD'}; } That pretty much sums up the difference: Win32::GetCwd() returns a directory in DOS form, with backslashes, whereas the Cwd module will convert those to forward slashes. And thanks for reminding me about the Cwd module; I really should use that more often rather than just backticking pwd. :) ---Ken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From slagel at geospiza.com Fri Sep 3 12:47:15 1999 From: slagel at geospiza.com (Joe Slagel) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Long module names and perl "classes"? Message-ID: <37D009A2.A3C3E47F@geospiza.com> Does anyone have a cute way of dealing using long module names when referring to them as classes. I'm tired of typing really long "MyTopDir::MySubDir::MySubSubDir::MyObject->new()" every time I want to create a new object. - Joe -- +--------------------------------------+-------------------------------+ | | Geospiza, Inc. | | Joe Slagel | 619 N 35 Street Suite 101M | | mailto:slagel@geospiza.com | Seattle WA, 98103 | | http://www.geospiza.com/people/joe | (206) 633-4403 | | | http://www.geospiza.com | +--------------------------------------+-------------------------------+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From Robert.Abarbanel at pss.boeing.com Fri Sep 3 14:01:40 1999 From: Robert.Abarbanel at pss.boeing.com (Abarbanel, Robert) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Long module names and perl "classes"? Message-ID: <618FD3AF120DD111A27900805F19D9C4063185EF@xch-blv-03.ca.boeing.com> You know those class-name-strings are just that, strings. You can say $s = "MyTopDir::MySubDir::MySubSubDir::MyObject" and then $newobj = $s->new() > ---------- > From: Joe Slagel[SMTP:slagel@geospiza.com] > Sent: Friday, September 03, 1999 10:47 AM > To: spug-list@pm.org > Subject: SPUG: Long module names and perl "classes"? > > Does anyone have a cute way of dealing using long module > names when referring to them as classes. I'm tired of > typing really long > "MyTopDir::MySubDir::MySubSubDir::MyObject->new()" every > time I want to create a new object. > > - Joe > > -- > +--------------------------------------+-------------------------------+ > | | Geospiza, Inc. | > | Joe Slagel | 619 N 35 Street Suite 101M | > | mailto:slagel@geospiza.com | Seattle WA, 98103 | > | http://www.geospiza.com/people/joe | (206) 633-4403 | > | | http://www.geospiza.com | > +--------------------------------------+-------------------------------+ > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From andy at n2h2.com Fri Sep 3 15:11:19 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Long module names and perl "classes"? In-Reply-To: <618FD3AF120DD111A27900805F19D9C4063185EF@xch-blv-03.ca.boeing.com> Message-ID: Or if you're using strict (strict 'refs' specifically), you could make sure that at least one of the classes is capable of acting as an object factory. my $factory = new MyTopDir::MySubDir::MySubSubDir::MyObject; # then when you want a new MyObject my $newobj = $factory->new; You are using strict, aren't you? On 09/03/99 @ 12:01, the infamous Abarbanel, Robert wrote: :} You know those class-name-strings are just that, strings. :} You can say $s = "MyTopDir::MySubDir::MySubSubDir::MyObject" :} and then :} $newobj = $s->new() :} :} > ---------- :} > From: Joe Slagel[SMTP:slagel@geospiza.com] :} > Sent: Friday, September 03, 1999 10:47 AM :} > :} > Does anyone have a cute way of dealing using long module :} > names when referring to them as classes. I'm tired of :} > typing really long :} > "MyTopDir::MySubDir::MySubSubDir::MyObject->new()" every :} > time I want to create a new object. -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 "Intelligent Technologies For | Seattle WA 98164-1059 a Safe and Productive Internet" | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From slagel at geospiza.com Fri Sep 3 15:23:34 1999 From: slagel at geospiza.com (Joe Slagel) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Long module names and perl "classes"? References: <618FD3AF120DD111A27900805F19D9C4063185EF@xch-blv-03.ca.boeing.com> Message-ID: <37D02E46.8D92D90E@geospiza.com> "Abarbanel, Robert" wrote: > You know those class-name-strings are just that, strings. > You can say $s = "MyTopDir::MySubDir::MySubSubDir::MyObject" > and then > $newobj = $s->new() I guess a large resounding "DUH" is approriate right now. Didn't see the forest because of the trees. Thanks. BTW, I like the idea of doing it like: use constant MyObject => "MyTopDir::MySubDir::MySubSubDir::MyObject; my $newObj = MyObject->new(); - Joe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From stuart_poulin at yahoo.com Fri Sep 3 17:14:33 1999 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Win32, use Cwd, and $ENV{PWD} Message-ID: <19990903221433.18343.rocketmail@web123.yahoomail.com> --- Ken McGlothlen wrote: > jshaffer@chronology.com (Jamie Shaffer) writes: > > | What's the difference between using Cwd to get the getCwd() function and > | using Win32? > > Well, not much if you're on Win32. If portability is your concern, then > > use Cwd; > > is definitely what you want. If you look at the Cwd.pm module, you'll find > the > following tidbit: > > sub _win32_cwd { > $ENV{'PWD'} = Win32::GetCwd(); > $ENV{'PWD'} =~ s:\\:/:g ; > return $ENV{'PWD'}; > } > ... Just don't rely on $ENV{PWD}, Cwd::chdir() does weird things with it on Win32: #!perl -l use Cwd qw(cwd chdir); chdir ('\\\\achilles\\Perl') or die "Can't cd: $! "; print "$ENV{PWD}"; print cwd; print "$ENV{PWD}"; __END__ D:/users/spoulin/tmp/\\achilles\Perl //achilles/Perl //achilles/Perl __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tgy at chocobo.org Fri Sep 3 20:40:17 1999 From: tgy at chocobo.org (Neko) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: Long module names and perl "classes"? In-Reply-To: Message-ID: On Fri, 3 Sep 1999, Andrew Sweger wrote: > Or if you're using strict (strict 'refs' specifically), you could make > sure that at least one of the classes is capable of acting as an object > factory. > > my $factory = new MyTopDir::MySubDir::MySubSubDir::MyObject; > my $newobj = $factory->new; 'use strict' doesn't care. The name of the class isn't being used as a symbolic reference. #!/usr/bin/perl -w use strict; my $class = 'MyTopDir::MySubDir::MySubSubDir::MyObject'; $class->new->foo; package MyTopDir::MySubDir::MySubSubDir::MyObject; sub new { bless [], shift } sub foo { print "FOO\n" } __END__ FOO -- perl -MLWP::IO -pe1 'data:text/signature, %57%69%6c%6c%20%68%61%63%6b%20%50%65%72%6c%20%66%6f%72%20%61%20 %6d%6f%6f%67%6c%65%20%73%74%75%66%66%79%21%20%3d%5e%2e%5e%3d%0a' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From debert at dusya.osd.com Fri Sep 10 16:16:27 1999 From: debert at dusya.osd.com (Daniel V. Ebert) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: question regarding using reg exp in "if" statements. Message-ID: <9909102116.AA11556@dusya.osd.com> I have written an "if" statement: if ($string eq "") { whatever;} else{ something else;} to check for blank entries in a form CGI. This works except that " " doesn't satisfy the if statemenet condition. What I really want is (in plain English) is: if ($string is only white space) I've tried stuff like: if($string eq /\s/) if($string ne /\w/) if($string eq m/\s/) if($string ne m/\w/) etc. but they don't work. I'm probably missing something obvious, but I can't figure it out. Any help would be appreciated. Thanks. --- Dan Ebert or Seanet Internet Services - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From jtraug at seanet.com Fri Sep 10 16:40:54 1999 From: jtraug at seanet.com (Jim Traugott) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: question regarding using reg exp in "if" statements. In-Reply-To: <9909102116.AA11556@dusya.osd.com> (debert@dusya.osd.com) References: <9909102116.AA11556@dusya.osd.com> Message-ID: <199909102140.OAA14740@mx.seanet.com> How about: if ($string =~ /^\s*$/) jim >>>>> "Daniel" == Daniel V Ebert writes: > I have written an "if" statement: > if ($string eq "") { whatever;} > else{ something else;} > to check for blank entries in a form CGI. This works except that " " > doesn't satisfy the if statemenet condition. > What I really want is (in plain English) is: > if ($string is only white space) > I've tried stuff like: > if($string eq /\s/) > if($string ne /\w/) > if($string eq m/\s/) > if($string ne m/\w/) > etc. > but they don't work. I'm probably missing something obvious, but I can't > figure it out. Any help would be appreciated. Thanks. > --- > Dan Ebert or > Seanet Internet Services - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From kevin at n2h2.com Fri Sep 10 16:44:17 1999 From: kevin at n2h2.com (Kevin Fink) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: question regarding using reg exp in "if" statements. In-Reply-To: <9909102116.AA11556@dusya.osd.com> Message-ID: What you're looking for is: if($string =~ /^\s*$/) { } else { } ^ Anchor to beginning of string. \s* Match zero or more instances of any string of whitespace characters. $ Anchor at end of string. Kevin On Fri, 10 Sep 1999, Daniel V. Ebert wrote: > I have written an "if" statement: > > if ($string eq "") { whatever;} > else{ something else;} > > to check for blank entries in a form CGI. This works except that " " > doesn't satisfy the if statemenet condition. > > What I really want is (in plain English) is: > if ($string is only white space) > > I've tried stuff like: > > if($string eq /\s/) > if($string ne /\w/) > if($string eq m/\s/) > if($string ne m/\w/) > etc. > but they don't work. I'm probably missing something obvious, but I can't > figure it out. Any help would be appreciated. Thanks. > > --- > Dan Ebert or > Seanet Internet Services > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > ------------------------------------------------------------------------------ Kevin Fink N2H2, Creators of Bess and Searchopolis Chief Technology Officer 900 Fourth Avenue, Suite 3400 http://www.n2h2.com/ Seattle, WA 98164 VOICE: 206-336-1501 / 800-971-2622 FAX: 206-336-1541 ------------------------------------------------------------------------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From rick at libronix.com Fri Sep 10 17:22:47 1999 From: rick at libronix.com (Rick Brannan) Date: Wed Aug 4 00:09:32 2004 Subject: SPUG: question regarding using reg exp in "if" statements. Message-ID: Instead of ... > if($string eq /\s/) > if($string ne /\w/) > if($string eq m/\s/) > if($string ne m/\w/) How about ... > if($string =~ /\s/) > if($string =~ /\w/) > if($string =~ m/\s/) > if($string =~ m/\w/) That oughta do the trick. You're not seeing if they're equal, you're doing a regex compare, so the =~ is the proper beast for the trick. However, the above would just check to see if a space character exists in $string, not if that's all it has. Maybe you'd be better off with something like: > if($string =~ /^\s*$/) The perlre page has got groovy info, as does Jeffrey Friedl's massive "Mastering Regular Expressions" from O'Reilly, which is the regex bible. Highly recommended. ______________________________ Rick Brannan -- Libronix Corp. rick@libronix.com -- http://www.libronix.com Parlez vous Supakoo? http://www.supakoo.com "You can't lose what you ain't never had." -- Muddy Waters > -----Original Message----- > From: Daniel V. Ebert [mailto:debert@dusya.osd.com] > Sent: Friday, September 10, 1999 2:16 PM > To: spug-list@pm.org > Subject: SPUG: question regarding using reg exp in "if" statements. > > > > I have written an "if" statement: > > if ($string eq "") { whatever;} > else{ something else;} > > to check for blank entries in a form CGI. This works except > that " " > doesn't satisfy the if statemenet condition. > > What I really want is (in plain English) is: > if ($string is only white space) > > I've tried stuff like: > > if($string eq /\s/) > if($string ne /\w/) > if($string eq m/\s/) > if($string ne m/\w/) > etc. > but they don't work. I'm probably missing something obvious, > but I can't > figure it out. Any help would be appreciated. Thanks. > > --- > Dan Ebert or > Seanet Internet Services > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Mon Sep 13 19:03:17 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Denver Job for "Excited" Individual In-Reply-To: <006301befe3f$f71e1090$c202a8c0@cboyles-r.corp.exactis.com> from "Cindy Boyles" at Sep 13, 99 05:30:28 pm Message-ID: <199909140003.RAA23286@consultix.wa.com> >> Message submitted at: Mon Sep 13 17:03:18 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2100 Tim, We'd like to post the following... Thanks, Cindy Boyles, SPHR Director, Human Resources Exactis.com 303.675.2379 cboyles@exactis.com Denver based Exactis.com, Inc., a world leader in solicited e-mail communications, is hiring excited personnel to develop cutting-edge technology services. Due to tremendous growth, Exactis.com is seeking to fill the following position at the Mid and Senior levels: Software Engineer You will be responsible for all aspects of the development lifecycle while creating next generation e-mail applications. You must have hands on Perl or Java expertise, C/C++ is desired. A good working knowledge of object-oriented principles, Perl objects, SCM and UNIX is required, and will prepare you for success in this position. Understanding and experience in UML, Booch, OMT, etc. a big plus. We offer competitive salaries, stock options and excellent benefits including health, dental and vision insurance, a top notch 401(k) plan, life insurance, short term disability, long term disability, generous reimbursement for parking or bus pass, partial reimbursement of health club membership and a great employee referral bonus plan. We have on-site Foosball, flexible hours and a casual environment. We will offer some relocation assistance to great developers. Join a fun team in a great and growing company. You will be working on projects for clients such as Sony Entertainment, Charles Schwab, First Union Bank, the Economist and BrainPlay.com. We have filed S1 and offer stock options to all employees. Salary range: $55k to $92k plus stock options...I know that's broad, but it includes Software Engineers, Senior Software Engineers and some Technical Lead positions. Please submit resumes to jobs@exactis.com, visit our web-site at www.exactis.com. ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Tue Sep 14 10:42:39 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: 9/21 talk on UNIX Proc. Mgmnt Message-ID: <199909141542.IAA25190@consultix.wa.com> >> Message submitted at: Tue Sep 14 08:42:39 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 962 UNIX PROCESS MANAGEMENT WITH PERL How to Write Daemons and Do Multi-Tasking At our September meeting, Darren Stalder, of the "Discordian Alliance for Teaching", will describe how to use Perl to write daemons and do multi-tasking on Unix systems. While explaining his sample programs, he will provide a brief description of socket communication and a more detailed explanation of multi-tasking techniques. The meeting will be held on 9/21/99, at 7pm, at Fred's Cancer Center (South end of Lake Union, in Seattle). See the web-site for a map and more details. P.S. Anybody wanting to make a presentation at an upcoming meeting should get in touch with Tim! ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Sep 16 23:13:23 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Exciting SQL/PERL Programmer Analyst 2 Openings Message-ID: <199909170413.VAA32350@consultix.wa.com> >> Message submitted at: Thu Sep 16 21:13:23 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1179 Subject: Exciting SQL/PERL Programmer Analyst 2 Openings I'm looking for 2 SQL/PERL Programmer Analyst for a 4 month project in Renton, WA. Details are as follows: Job Description: Application programmer in support of a tracking system. Candidate must have a strong understanding and experience in software development. Must be able to independently develop application code based on written functional specifications. Must understand relational database concept and have experience with web development technologies. Job Skills & Qualifications: * PERL programming (1 yr. min. with experienced use on an application development project) * HTML (1 yr. min. with experienced use on an application development project) * SQL (3 yrs. min.) * Oracle (desired) * InConsert (or workflow application desired) Education: Computer Science degree desired but not required. I can pay up to $50.00 W2 or 1099 if incorporated. I can also pay 70K per year if the candidate is interested in a full-time job and they bring along other skills. Please email me your resumes directly and let me know when you will be available to interview. Dante Haddad dante@bestnet.com BEST CONSULTING - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ryan at erwin.org Fri Sep 17 13:07:48 1999 From: ryan at erwin.org (Ryan Erwin) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: 4 Quick Questions (symlinks, anon. arrays, shell commands...) Message-ID: <99091711383600.01285@linbox> Question 1: Say i have a hash: %hash The current key of the hash is $_, accessed by $hash{$_}. I have values qw(x y z) that I want to push into an anonymous array in the value of $hash{$_}. I can't remember how! Question 2: Say my file system contains this: ( -> is a symlink ) /usr/bin/file1 /bin/file2 -> ../usr/bin/file1 /bin/file3 -> /usr/bin/file1 /bin/file4 -> ../usr/../usr/../usr/bin/../bin/file1 /bin/file5 -> /usr/bin/../../usr/bin/file1 /bin/file6 -> file2 How can I resolve where these links are pointing to? The only way that I have figured out is to chdir to the directory that contains the symlink i'm reading, strip out the path given by readlink, then chdir to the path. Then I still don't know how to get the working directory without using the shell (`pwd`). Question 3: Is there a way to find the current working directory from perl without using pwd in backticks? ( my $dir = `pwd` ) Question 4: Is there a way to find out what a file is dynamically linked with besides using ldd in backticks? ( my $_ = `ldd $file` ) If you want more of the why i'm doing this, continue reading... ---------------------------------------------------------------- I'm creating a little utility to figure out different files on my system depend on other files. The program takes a list of complete file names on STDIN and checks if they are executable. If they are executable, I `ldd some_executable_file` to check what it depends on. I want to store the data then I'll figure out how to manipulate it so that I can output it in the most logical way for what I'm doing (trying to build a new distro from scratch... absalute minimal use of existing binaries) Thanks Ryan Erwin [ryan@erwin.org] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From andy at n2h2.com Fri Sep 17 14:56:38 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: 4 Quick Questions (symlinks, anon. arrays, shell commands...) In-Reply-To: <99091711383600.01285@linbox> Message-ID: On Sep 17, 1999 @ 11:07am, Ryan Erwin wrote: :} Question 1: :} Say i have a hash: %hash :} The current key of the hash is $_, accessed by $hash{$_}. :} I have values qw(x y z) that I want to push into an anonymous :} array in the value of $hash{$_}. I can't remember how! push @{$hash{$_}}, qw(x y z); -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 "Intelligent Technologies For | Seattle WA 98164-1059 a Safe and Productive Internet" | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From puckett at nwlink.com Fri Sep 17 15:43:36 1999 From: puckett at nwlink.com (Richard A Puckett II) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: 4 Quick Questions (symlinks, anon. arrays, shell commands...) References: <99091711383600.01285@linbox> Message-ID: <37E2A7F8.AB2C9FB0@nwlink.com> Ryan Erwin wrote: > How can I resolve where these links are pointing to? readlink ($linked_file); > Is there a way to find the current working directory from perl > without using pwd in backticks? ( my $dir = `pwd` ) > perldoc Cwd > Is there a way to find out what a file is dynamically linked > with besides using ldd in backticks? ( my $_ = `ldd $file` ) Not that I know of.... :( - Richard. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mcglk at serv.net Fri Sep 17 16:20:13 1999 From: mcglk at serv.net (Ken McGlothlen) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: 4 Quick Questions (symlinks, anon. arrays, shell commands...) In-Reply-To: Ryan Erwin's message of "Fri, 17 Sep 1999 11:07:48 -0700" References: <99091711383600.01285@linbox> Message-ID: <87n1ulme0i.fsf@ralf.serv.net> Ryan Erwin writes: | Question 1: | Say i have a hash: %hash | The current key of the hash is $_, accessed by $hash{$_}. I have values | qw(x y z) that I want to push into an anonymous array in the value of | $hash{$_}. I can't remember how! A disclaimer before I go on: NONE OF THIS IS TESTED CODE. Wouldn't this just be something like $hash{$_} = ["x", "y", "z"]; ? Oh, wait. You want to *push* the values into an existing array reference? push( @{$hash{$_}}, qw( x y z ) ); That should still work. | Question 2: | Say my file system contains this: ( -> is a symlink ) | /usr/bin/file1 | /bin/file2 -> ../usr/bin/file1 | /bin/file3 -> /usr/bin/file1 | /bin/file4 -> ../usr/../usr/../usr/bin/../bin/file1 | /bin/file5 -> /usr/bin/../../usr/bin/file1 | /bin/file6 -> file2 | | How can I resolve where these links are pointing to? The only way that I | have figured out is to chdir to the directory that contains the symlink i'm | reading, strip out the path given by readlink, then chdir to the path. Then | I still don't know how to get the working directory without using the shell | (`pwd`). You may want to take a look at the Cwd module that comes with Perl 5. (I was recently reminded of this myself.) It implements the getcwd() function, the abs_path() function, and so on. It tries to ensure portability across Unix, VMS and Windows currently. So you'd do something like use Cwd; $where = abs_path( readlink( "/bin/file4" ) ); | Question 3: | Is there a way to find the current working directory from perl without using | pwd in backticks? ( my $dir = `pwd` ) use Cwd; $cwd = getcwd(); | Question 4: | Is there a way to find out what a file is dynamically linked with besides | using ldd in backticks? ( my $_ = `ldd $file` ) Okay, you got me there. There's nothing that I know of in CPAN that does this, either. :) Good luck with your project. ---Ken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Mon Sep 20 21:34:50 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Re: 9/21 talk on UNIX Proc. Mgmnt In-Reply-To: <199909141542.IAA25190@consultix.wa.com> from "Tim Maher/CONSULTIX" at Sep 14, 99 08:42:39 am Message-ID: <199909210234.TAA11898@consultix.wa.com> >> Message submitted at: Mon Sep 20 19:34:50 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1078 According to Tim Maher/CONSULTIX: > > UNIX PROCESS MANAGEMENT WITH PERL > How to Write Daemons and Do Multi-Tasking > > At our September meeting, Darren Stalder, of the "Discordian . . . Due to illness, Darren won't be able to make this presentation after all. Would anybody like to volunteer to give a talk on some other topic tomorrow? If so, contact me ASAP: tim@consultix-inc.com, 206-781-8649 If there are no takers, I could show some of the material from my new 1-day "Advanced Pattern Matching with Perl" class, both to enlighten those who don't know much yet and also to solicit input from those who know even more than me on the subject! 8-} *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | | FALL SCHEDULE OF PUBLIC UNIX/Perl CLASSES COMING SOON! | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From andy at n2h2.com Tue Sep 21 00:45:47 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Re: 9/21 talk on UNIX Proc. Mgmnt In-Reply-To: <199909210234.TAA11898@consultix.wa.com> Message-ID: There's at least seven folks from SPUG that were at the Perl Conference that I remember seeing. They probably don't remember anything, but they could probably ramble on about a thing or two. On Sep 20, 1999 @ 7:34pm, Tim Maher/CONSULTIX wrote: :} If there are no takers, I could show some of the material from my new :} 1-day "Advanced Pattern Matching with Perl" class, both to enlighten :} those who don't know much yet and also to solicit input from those who :} know even more than me on the subject! 8-} -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 "Intelligent Technologies For | Seattle WA 98164-1059 a Safe and Productive Internet" | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Tue Sep 21 11:20:23 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: 9/21 Meeting: Tim on Pattern Matching Message-ID: <199909211620.JAA02024@consultix.wa.com> >> Message submitted at: Tue Sep 21 09:20:23 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 896 The program for tonight's SPUG meeting has been changed to the following: 1) informal report from SPUGers who attended the recent Perl Conference 2) Tim Maher on "Pattern-Matching in Perl: Beyond the Basics", covering the use of string and word anchors (\A, \Z, \b), match variables (\1, $1, $&, etc.), multi-line matching mode (/RE/m), loading arrays and hashes from matched data (%hash=/RE/mg), and using eval'd code in replacement strings (s/RE/code/e). As usual, we'll be meeting at 7pm at Fred's Cancer Center - see the web page for details. *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Wed Sep 22 10:47:53 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Correction to Sample Program Message-ID: <199909221547.IAA05342@consultix.wa.com> >> Message submitted at: Wed Sep 22 08:47:53 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1400 SPUGers, As pointed out by a few sharp-eyed participants at last night's SPUG show, the joining of input lines in the program below needs to use the TAB character, rather than the NULL string as shown in last night's version, in converting program input into a scalar. (I had been modifying the program right up to "showtime", and as sometimes happens a discrepancy had arisen between the published version and the one I had actually tested.) Here's the corrected version: #! /usr/local/bin/perl -w # emp_ids2: associate employee surnames with employee-ids # This version loads hash directly from matches, without # using any intervening variables # Tim Maher, 6/1/99 # Sample input line: # Richard Simmons 312-45-8679 $_=join "\t", <>; # put all input into scalar # Equivalent to: %emps=( 'key1', 'value1', 'key2', 'value2', etc.) %emps=/[^\t]+/g; # returns matches, order interpreted as (key, value) END{ print "\nEmployee ID of Simmons is: $emps{'Richard Simmons'}\n"; } *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | | FALL SCHEDULE OF PUBLIC UNIX/Perl CLASSES COMING SOON! | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Wed Sep 22 13:11:04 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: /(abc)/g in SCALAR; /g unnecessary Message-ID: <199909221811.LAA06101@consultix.wa.com> >> Message submitted at: Wed Sep 22 11:11:04 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1417 SPUGers, Colin said last night that the /g is not needed to get parenthesized matches returned in the SCALAR context; unfortunately, at the time, our projectable-laptop wasn't yet working, so I wasn't able to do a live test to settle the issue. Having now looked into this, I see that he is correct (as usual!). I vaguely remembered a case I had encountered in which the presence/absence of the /g seemed to make a difference, but I haven't been able to reproduce it, so until further notice 8-}, I too believe that the /g is not needed to get post-match variables set! Thanks for the clarification! -Tim P.S. NOTE: if you want to repeatedly perform matches against the same string, you'll need /g; that's not what we're talking about here! $ cat /tmp/c #! /usr/bin/perl -w # Parenthesized matches returned, whether or not /g present $_='Linux 2.0.36. (POSIX).'; /(\w+)\s+(\w+)/ and print "Found $1/$2\n"; /(\w+)\s+(\w+)/g and print "Found $1/$2\n"; $ /tmp/c Found Linux/2 Found Linux/2 $ *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | | FALL SCHEDULE OF PUBLIC UNIX/Perl CLASSES COMING SOON! | *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From gary at 2dgs.com Wed Sep 22 19:46:03 1999 From: gary at 2dgs.com (Gary Varnell) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: more regx stuff Message-ID: <37E9784B.D9467CDF@2dgs.com> Hello fellow SPUGers After last nights meeting I decided to do some regx test. I have to admit I had a hard time predicting the results. If any one would like the source code that produced the following let me know. It is pretty basic stuff! Here are two regx test on a list of space seperated names: tom jones mike smith carl nelson dan strange merylin james The first two examples assign the results to an array Remeber, since we are assigning to an array 0 = 1 or the first position in array Here is the # of matches found using /(S+)/g --------------------------------------------- 9 --------------------------------------------- Here is the # of matches found using /(S+)/ --------------------------------------------- 0 --------------------------------------------- Same as above with results assigned to a scaler variable Here is the # of matches found using /(S+)/g --------------------------------------------- 1 --------------------------------------------- Here is the # of matches found using /(S+)/ --------------------------------------------- 1 --------------------------------------------- Supprised? Gary Varnell -- __________________________________________________________ Digital Graphics Studios (DGS) ---------------------------------------------------------- Website: http://www.2dgs.com Phone: (360) 491-1149 E-mail: mailto:Info@2dgs.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/19990922/fff00ea9/attachment.htm From tim at consultix-inc.com Wed Sep 22 21:08:13 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: more regx stuff In-Reply-To: <37E9784B.D9467CDF@2dgs.com> from "Gary Varnell" at Sep 22, 99 05:46:03 pm Message-ID: <199909230208.TAA07207@consultix.wa.com> >> Message submitted at: Wed Sep 22 19:08:13 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2884 According to Gary Varnell: > > Hello fellow SPUGers > After last nights meeting I decided to do some regx test. > I have to admit I had a hard time predicting the results. > If any one would like the source code that produced the following let me > know. > It is pretty basic stuff! Gary, Please post the source code so we can see what you did and fool around with our own modifications. Incidentally, I'm assuming that in each of your REs below you meant \S+ when you wrote S+. Thanks, Tim P.S. More comments below > > Here are two regx test on a list of space seperated names: tom jones mike smith carl nelson dan strange merylin james > > The first two examples assign the results to an array > Remeber, since we are assigning to an array 0 = 1 or the first position > in array > > Here is the # of matches found using /(S+)/g How did you obtain/print the number of matches? > --------------------------------------------- > 9 I got 10, using: perl -ne '@a=/(\S+)/g; print scalar @a, "\n";' < data_file > --------------------------------------------- > > Here is the # of matches found using /(S+)/ I got 1. Once again, how did you obtain/print the number of matches? > --------------------------------------------- > 0 > --------------------------------------------- > > Same as above with results assigned to a scaler variable > > Here is the # of matches found using /(S+)/g > --------------------------------------------- > 1 That's correct. In scalar context, the matching operator returns a T/F code to indicate the success in matching. If you had looked, you would have also found the first word in $1, since you used () around the RE. > --------------------------------------------- > > Here is the # of matches found using /(S+)/ > --------------------------------------------- > 1 That's also correct. The /g makes no difference for a single application of the operator in scalar context. > --------------------------------------------- > > Supprised? Nope. You probably are expecting // to do something different than it really does, and/or writing the wrong code for your tests. (Been there, done that, come to grips with it! 8-}) -Tim > > Gary Varnell > -- > __________________________________________________________ > Digital Graphics Studios (DGS) > ---------------------------------------------------------- > Website: http://www.2dgs.com Phone: (360) 491-1149 > E-mail: mailto:Info@2dgs.com > *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |Classes: 11/1 Shell/Utils 11/15 Adv Shell 12/6 LINUX 12/13 Perl| *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mherrewig at hotmail.com Thu Sep 23 13:13:38 1999 From: mherrewig at hotmail.com (Michael Herrewig) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Introducing me + dumb newbie question Message-ID: <19990923181346.47019.qmail@hotmail.com> Hi, First, I'd like to introduce myself. My name is Mike Herrewig. I've just recently moved to Everett from Baraboo, WI. I've been using information systems since 1994 when I joined the Army. Since, I have had experience with almost everything. If it has a monitor and keyboard I've probably used it:) A few weeks ago I began my rigorous perl self-education with "Learning Perl" by the wonderful people at ORA. I have no previous programming experience besides a little BASIC(more specifically Qbasic), with a dash of Pascal and some bash shell thrown in for flavor. Anyway, here's my question pertaining to Chapter 5, Hashes. Exercise 2 at the end of the chapter challenged me to the point of total confusion. I tried for a couple of hours to figure it out myself before giving up and looking at the answer in the back. After seeing the answer I was even more confused. For those who don't have the book I'll include the exercise and code below: 2. Write a program that reads a series of words with one word per line until end-of-file, then prints a summary of how many times each word was seen. #!/usr/bin/perl -w #typos are mine :) print "Please enter a few words, one word per line (^D to end)\n"; chomp(@words = ); foreach $word (@words) { $count{$word}++; } foreach $word (keys %count) { print "$word was seen $count{$word} times.\n"; } If anybody can answer 1 or more of the following questions, it would be wonderfully appreciated to the point where I may consider sending money:) 1. at which point is the %count actually created and what values are being injected(I'm assuming numbers)? 2. does %count only contain keys? the book mentioned nothing of this functionality. 3. is there a perl IDE available to set breaks and step through the code and view variable info intermittantly like Qbasic (lame i know)? 4. do I read the perldocs with man or perldoc? 5. anybody have a jr. SA job available for a hard-working, fast learning, enthusiastic person? If you've made it this far, thank you. I look forward to meeting some of you at the next meeting (if I'm still invited after sending this blatantly self-serving message :) I bow to the perl gurus. - ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From schieb at cobaltgroup.com Thu Sep 23 13:43:43 1999 From: schieb at cobaltgroup.com (Brian Schieber) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: introduction In-Reply-To: <19990923181346.47019.qmail@hotmail.com> from "Michael Herrewig" at Sep 23, 99 11:13:38 am Message-ID: <199909231843.LAA23366@beryllium.cobaltgroup.com> A non-text attachment was scrubbed... Name: not available Type: text Size: 1241 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/19990923/96265b85/attachment.bat From tim at consultix-inc.com Thu Sep 23 14:55:24 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Introducing me + dumb newbie question In-Reply-To: <19990923181346.47019.qmail@hotmail.com> from "Michael Herrewig" at Sep 23, 99 11:13:38 am Message-ID: <199909231955.MAA13103@consultix.wa.com> >> Message submitted at: Thu Sep 23 12:55:24 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 4013 According to Michael Herrewig: > > Hi, > > First, I'd like to introduce myself. My name is Mike Herrewig. I've just > recently moved to Everett from Baraboo, WI. I've been using information > systems since 1994 when I joined the Army. Since, I have had experience > with almost everything. If it has a monitor and keyboard I've probably used > it:) > > A few weeks ago I began my rigorous perl self-education with "Learning Perl" > by the wonderful people at ORA. I have no previous programming experience > besides a little BASIC(more specifically Qbasic), with a dash of Pascal and > some bash shell thrown in for flavor. > > Anyway, here's my question pertaining to Chapter 5, Hashes. Exercise 2 at > the end of the chapter challenged me to the point of total confusion. I > tried for a couple of hours to figure it out myself before giving up and > looking at the answer in the back. After seeing the answer I was even more > confused. For those who don't have the book I'll include the exercise and > code below: > > 2. Write a program that reads a series of words with one word per line until > end-of-file, then prints a summary of how many times each word was seen. > > #!/usr/bin/perl -w > #typos are mine :) > print "Please enter a few words, one word per line (^D to end)\n"; > chomp(@words = ); > foreach $word (@words) { > $count{$word}++; > } > foreach $word (keys %count) { > print "$word was seen $count{$word} times.\n"; > } > > If anybody can answer 1 or more of the following questions, it would be > wonderfully appreciated to the point where I may consider sending money:) > > 1. at which point is the %count actually created and what values are being > injected(I'm assuming numbers)? Created when first seen, on the first pass through the foreach loop The ++ tries to increment an existing value in the hash associated with the $word key, but finds none, so the default value of 0 is incremented, and left as the new value, on the first use of each $word. > 2. does %count only contain keys? the book mentioned nothing of this > functionality. %count contains key/value pairs, which you would see if you did "print %count" Providing %count as the argument to the keys function (which is what "keys %count" means) extracts the keys, only, from the hash, allowing them to be provided as the list of values for the foreach() loop > 3. is there a perl IDE available to set breaks and step through the code and > view variable info intermittantly like Qbasic (lame i know)? Yup, Perl has a built-in debugger, which you get at by doing "perl -d script-name" > 4. do I read the perldocs with man or perldoc? In general, use man on UNIX, perldoc otherwise. > 5. anybody have a jr. SA job available for a hard-working, fast learning, > enthusiastic person? Sorry, no! > > If you've made it this far, thank you. I look forward to meeting some of > you at the next meeting (if I'm still invited after sending this blatantly > self-serving message :) I bow to the perl gurus. This is the kind of stuff this list is for! > - > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > > *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |Classes: 11/1 Shell/Utils 11/15 Adv Shell 12/6 LINUX 12/13 Perl| *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From jope-spug at n2h2.com Thu Sep 23 14:52:50 1999 From: jope-spug at n2h2.com (El JoPe Magnifico) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Re: Herrewig's newbie questions In-Reply-To: <19990923181346.47019.qmail@hotmail.com> Message-ID: On Thu, 23 Sep 1999, Michael Herrewig wrote: > print "Please enter a few words, one word per line (^D to end)\n"; > chomp(@words = ); > foreach $word (@words) { > $count{$word}++; > } > foreach $word (keys %count) { > print "$word was seen $count{$word} times.\n"; > } [...] > 1. at which point is the %count actually created and what values > are being injected (I'm assuming numbers)? %count springs into existence automatically the first time you use it. In this case, first time through the first for loop at "$count{$word}++;" After (first time through that loop, anyway) the hash itself is created (behind the scenes), the hash entry $count{$word} springs into existence, on the same line, if it didn't already exist. When first created, the value for this hash entry is undef. Using the post-increment op (++) on that value makes the undef convert to (or - dare I use the expression again? - spring into existence as) the numerical value zero just before performing the increment. Lot of stuff that happens automagically behind the scenes, all in just this single line of code! Which saves you from having to do cumbersome declarations and initializations yourself. In perl, 'laziness' is one of our three virtues (along with 'impatience' and 'hubris'). That said, don't let your habits get too lazy if you plan to ever use the 'strict' pragma someday, or your suffering shall be great indeed. > 2. does %count only contain keys? the book mentioned nothing of this As stated above, each key does have a value, it just starts off as undef if not initialized otherwise. (I think that's what you're aksing here) > 3. is there a perl IDE available to set breaks and step through the code > and view variable info intermittantly like Qbasic (lame i know)? See 'perldoc perldebug' for details. Perl has a built in debugger mode. A bit kludgy in terms of being a line-oriented interface, but powerful. There are a few other interfaces that are more user-friendly; see... http://www.perl.com/reference/query.cgi?debug > 4. do I read the perldocs with man or perldoc? perldoc is preferred. Most packages will also man-ify their documentation, so you can also use man, but perldoc has some handy additional features. See 'perldoc perldoc' for details. -jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From matw at halcyon.com Thu Sep 23 14:54:51 1999 From: matw at halcyon.com (Mathew D. Watson) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Introducing me + dumb newbie question In-Reply-To: <19990923181346.47019.qmail@hotmail.com> Message-ID: <3.0.5.32.19990923125451.0083e7f0@mail.halcyon.com> Finally, some questions I might be able to answer. ... Perl gurus please take it easy on me if I've blundered. 1. %count is an associateve array (or hash). The statement that creates %count is $count{$word}++ I think it gets created when the interpreter first hits that statement, but I'll let someone who really knows answer that. 2. No, %count contains both the keys and the values. I don't have perl up and running right now, but here's something you can do to try and get a feel for how associative arrays are structured: @foo = %count; print @foo; You'll see both the keys and values (they won't look pretty though). Now if someone can answer your question number 3., then you can examine @foo using the debugger. Good Luck! Mat At 11:13 AM 9/23/99 PDT, you wrote: >Hi, > >First, I'd like to introduce myself. My name is Mike Herrewig. I've just >recently moved to Everett from Baraboo, WI. I've been using information >systems since 1994 when I joined the Army. Since, I have had experience >with almost everything. If it has a monitor and keyboard I've probably used >it:) > >A few weeks ago I began my rigorous perl self-education with "Learning Perl" >by the wonderful people at ORA. I have no previous programming experience >besides a little BASIC(more specifically Qbasic), with a dash of Pascal and >some bash shell thrown in for flavor. > >Anyway, here's my question pertaining to Chapter 5, Hashes. Exercise 2 at >the end of the chapter challenged me to the point of total confusion. I >tried for a couple of hours to figure it out myself before giving up and >looking at the answer in the back. After seeing the answer I was even more >confused. For those who don't have the book I'll include the exercise and >code below: > >2. Write a program that reads a series of words with one word per line until >end-of-file, then prints a summary of how many times each word was seen. > >#!/usr/bin/perl -w >#typos are mine :) >print "Please enter a few words, one word per line (^D to end)\n"; >chomp(@words = ); >foreach $word (@words) { > $count{$word}++; >} >foreach $word (keys %count) { > print "$word was seen $count{$word} times.\n"; >} > >If anybody can answer 1 or more of the following questions, it would be >wonderfully appreciated to the point where I may consider sending money:) > >1. at which point is the %count actually created and what values are being >injected(I'm assuming numbers)? >2. does %count only contain keys? the book mentioned nothing of this >functionality. >3. is there a perl IDE available to set breaks and step through the code and >view variable info intermittantly like Qbasic (lame i know)? >4. do I read the perldocs with man or perldoc? >5. anybody have a jr. SA job available for a hard-working, fast learning, >enthusiastic person? > >If you've made it this far, thank you. I look forward to meeting some of >you at the next meeting (if I'm still invited after sending this blatantly >self-serving message :) I bow to the perl gurus. >- > >______________________________________________________ >Get Your Private, Free Email at http://www.hotmail.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > ---------------------------------------------------------------- Mathew D. Watson matw@halcyon.com ---------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From trance at drizzle.com Thu Sep 23 15:08:52 1999 From: trance at drizzle.com (Christopher Maujean) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Introducing me + dumb newbie question In-Reply-To: <199909231955.MAA13103@consultix.wa.com> Message-ID: The other option for a graphical interface to the debugger is perl -d:ptkdb which can be found on the net.. I cant remember where I got it, but it certainly makes debugging nicer.. or if you do win32 perl you can use the Activestate graphical debugger (www.activestate.com). --Christopher - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From bwisti at hotpop.com Thu Sep 23 08:37:56 1999 From: bwisti at hotpop.com (Brian Wisti) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Introducing me + dumb newbie question In-Reply-To: <19990923181346.47019.qmail@hotmail.com> References: <19990923181346.47019.qmail@hotmail.com> Message-ID: <99092306520100.15623@rakesnake> Hi Mike - I don't know much Perl, but I think I know enough to help you out here. Just follow along... > 2. Write a program that reads a series of words with one word per line until > end-of-file, then prints a summary of how many times each word was seen. > > #!/usr/bin/perl -w > #typos are mine :) > print "Please enter a few words, one word per line (^D to end)\n"; > chomp(@words = ); > foreach $word (@words) { > $count{$word}++; > } > foreach $word (keys %count) { > print "$word was seen $count{$word} times.\n"; > } > > If anybody can answer 1 or more of the following questions, it would be > wonderfully appreciated to the point where I may consider sending money:) > > 1. at which point is the %count actually created and what values are being > injected(I'm assuming numbers)? Unless you are running with 'use strict' Perl creates your variables the first time it sees them. In the process, it sets them to an initial value that makes sense (usually zero). > 2. does %count only contain keys? the book mentioned nothing of this functionality. A hash works like an array using words instead of index numbers to figure out where things are. The actual value of each key in this case if the number of times it has seen the key word in our array of words. As usual, Perl will create the key if it hasn't already seen it, doing its "sensible value" magic. For each time it sees a word in the array, it increments the count for that particular word. > 3. is there a perl IDE available to set breaks and step through the code and > view variable info intermittantly like Qbasic (lame i know)? There are a few out there. Me, I'm still teaching myself about how to use the debugging tools (too many years of inserting 'print STDERR "Debug Value: $value\n"') >4. do I read the perldocs with man or perldoc? The easiest way to get through the perldocs is with perldoc > 5. anybody have a jr. SA job available for a hard-working, fast learning, >enthusiastic person? There's a lot out there. I didn't think my skills were all that great, and I'm going through the bizarre process of choosing which positions I want. > > If you've made it this far, thank you. I look forward to meeting some of > you at the next meeting (if I'm still invited after sending this blatantly > self-serving message :) I bow to the perl gurus. Thanks for asking a question I could answer :) The folks on this list are incredible. I learn a lot just lurking. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From davec at linuxstart.com Fri Sep 24 00:27:27 1999 From: davec at linuxstart.com (davec) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Variation on a dumb newbie question Message-ID: <19990924052727.9949.qmail@ns1.filetron.com> > 2. No, %count contains both the keys and the values. I don't have perl up > and running right now, but here's something you can do to try and get a > feel for how associative arrays are structured: > > @foo = %count; > print @foo; > > You'll see both the keys and values (they won't look pretty though). Now if you can also: print "@foo"; and the elements of the array will be separated by spaces. Or more perversly printf "%s: " x ($#foo+1),@foo; ------ Do you do Linux? :) Get your FREE @linuxstart.com email address at: http://www.linuxstart.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From trance at drizzle.com Fri Sep 24 01:58:11 1999 From: trance at drizzle.com (Christopher/Shalah) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Variation on a dumb newbie question References: <19990924052727.9949.qmail@ns1.filetron.com> Message-ID: <004d01bf065a$2aed95e0$17c1a2d8@atombomb> ## Or to be even more perverse: %foo = ( 'one' => 'won', 'two' => 'too', 'three' => 'tree', ); print map { "$_\=$foo{$_}\n" } (keys %foo); ## produces: ## ## three=tree ## two=too ## one=won - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From davec at linuxstart.com Fri Sep 24 13:43:01 1999 From: davec at linuxstart.com (davec) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Introducing me + dumb newbie question Message-ID: <19990924184301.23978.qmail@ns1.filetron.com> Christopher Maujean wrote: >The other option for a graphical interface to the debugger is >perl -d:ptkdb Thanks for the tip >which can be found on the net.. >I cant remember where I got it, but it certainly makes debugging nicer.. I found it at http://theory.uwinnipeg.ca/CPAN/data/Devel-ptkdb/ptkdb.html a nice CPAN search engine to be sure ------ Do you do Linux? :) Get your FREE @linuxstart.com email address at: http://www.linuxstart.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Fri Sep 24 18:19:08 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Perl Project, for Educational App. Message-ID: <199909242319.QAA17455@consultix.wa.com> >> Message submitted at: Fri Sep 24 16:19:08 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1814 Nationally recognized educational specialist needs help from a Perl programmer in doing application development and system integration for an educational product designed for Windows boxes (with Apple support to follow later). Textual forms and images need to be displayed on the screen (photos, maps, checklists, multiple-choice tests, etc.), and mouse and keyboard inputs need to be tallied, stored in simple "databases" and displayed on subsequent screens in summary formats (pie-charts, histograms, graphs, etc.). In a subsequent release, data will need to be exchanged with a central archive site over the Internet. The current plan is to implement the solution using a basic OpenSource HTML-browser/server pair (to manage the screen displays and collect form inputs) in conjunction with some Perl CGI programs and standard Perl modules. The programmer would be required to work out the details of the solution, and integrate the various pieces (Perl interpreter, browser, server, modules, custom application, installation script) into a complete product for distribution on CD-ROM. The programmer needs to understand the Windows platform(s), and know how to write portable Perl applications. The ideal candidate would be someone familiar with both the Windows and Apple OS, to facilitate a planned port of the second release to that platform. Consideration will also be given to programmers who might find this project an appealing opportunity to "stretch" their current skills, such as students, in exchange for a lower pay rate. The programmer could be compensated on a project-bid basis, or on a revenue-sharing basis. Educator's references available on request. Show your interest by sending Email to dvh@LearnX.org, or calling David Harte at (206) 324-4420 between 8am and 9pm Seattle time. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From caseyt at metaip.checkpoint.com Fri Sep 24 19:04:50 1999 From: caseyt at metaip.checkpoint.com (caseyt@metaip.checkpoint.com) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Win32::Registry::RegConnectRegistry Message-ID: Hi everyone, I have been lurking on this list for a few weeks and finally ran into a snag I can't seem to work out of. I hope someone out there has used this Perl module and can clear this up. For testing some software I need to remotely change some registry settings over and over. To do this I am trying to use the following: require Win32::Registry; $location = "HKEY_LOCAL_MACHINE\\SOFTWARE\\MICROSOFT"; Win32::Registry::RegConnectRegistry("\\\\192.168.3.150",$location,$keyhandle ) || die " died on connect $!"; I have also tried ...Registry("\\\\hostname",$location,$keyhandle) ...Registry("\\\\hostname.fullyqualified.com",$location,$keyhandle) ...Registry(\\\\192.168.3.150,$location,$keyhandle) ...Registry(\\\\hostname,$location,$keyhandle) ...Registry(192.168.3.150,$location,$keyhandle) ...Registry(hostname,$location,$keyhandle) and I have also tried setting up a net use to the remote machine under that machines administrator prior to trying this (in case I needed some background authentication or something). Does anyone have a good understanding of whats going on in the background on RegConnectRegistry that is causing all of my efforts to use it to fail? Thanks guys, and have a good weekend. Casey - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From caseyt at metaip.checkpoint.com Tue Sep 28 16:32:15 1999 From: caseyt at metaip.checkpoint.com (caseyt@metaip.checkpoint.com) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules Message-ID: Hi again Perl gurus and generally smart people, I have a question about file handles and modules and how they can get all mixed up. Here is what I have: Main Script (many of these) Opens and writes to a file handle. Perl Module (has all of the subroutines for all the main scripts) Also needs to write to the file. The solutions I can think of are: 1. Open and close the file handle every time I write to it. 2. Have file handles open to the file in the module and the script at the same time. Is there some graceful way that I can reference an open filehandle in my main script from the Perl module that has been called? Something pretty like main::filehandle? Thanks again, Casey - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From jimfl at colltech.com Tue Sep 28 17:59:24 1999 From: jimfl at colltech.com (jimfl) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: Message-ID: <378670.3147523164@erdos.nwest.attws.com> --On Tue, Sep 28, 1999 2:32 PM -0700 caseyt@metaip.checkpoint.com wrote: > Hi again Perl gurus and generally smart people, > > I have a question about file handles and modules and how they can > get all mixed up. Here is what I have: > > Main Script (many of these) > Opens and writes to a file handle. > > Perl Module (has all of the subroutines for all the main scripts) > Also needs to write to the file. > > The solutions I can think of are: > > 1. Open and close the file handle every time I write to it. > 2. Have file handles open to the file in the module and the script > at the same time. > > Is there some graceful way that I can reference an open filehandle > in my main script from the Perl module that has been called? > Something pretty like main::filehandle? use FileHandle; my $fh = new FileHandle(); $fh->open $filename; $line = <$fh>; &SomeModule::do_something_interesting($fh); -- Jim Flanagan Collective Technologies jimfl@colltech.com http://www.colltech.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From trance at drizzle.com Tue Sep 28 18:02:23 1999 From: trance at drizzle.com (Christopher Maujean) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: Message-ID: try the FileHandle package... ## ## I have used this package before, and it works like a charm. ## ## Warning: ## *******untested code ahead.... use FileHandle; my $filename = "/etc/passwd"; my $dictfile = "/tmp/trance/passdict"; my $fh = new Filehandle; my $dh = new Filehandle; open ($dh, $dictfile) or die "$!"; my @dict = <$dh>; close $dh; open ($fh, $filename) or die "$!"; WLOOP: while (<$fh>) { my ($name, $pwd) = (split /:/, $_); foreach $word (@dict) { print "$name \= $pwd\n" if crypt($word) eq $pwd; next WLOOP; } } close $fh; ## use $fh wherever you would use a "normal" filehandle ## except its easier to pass copies to subs, etc... ## but I wouldnt try to simultaneously write to this file ## from different threads or forked children, unless you really ## know what you are doing..(or if the file is unimportant) ## __END__ On Tue, 28 Sep 1999 caseyt@metaip.checkpoint.com wrote: > Hi again Perl gurus and generally smart people, > > I have a question about file handles and modules and how they can get all > mixed up. Here is what I have: > > Main Script (many of these) > Opens and writes to a file handle. > > Perl Module (has all of the subroutines for all the main scripts) > Also needs to write to the file. > > The solutions I can think of are: > > 1. Open and close the file handle every time I write to it. > 2. Have file handles open to the file in the module and the script at the > same time. > > Is there some graceful way that I can reference an open filehandle in my > main script from the Perl module that has been called? Something pretty like > main::filehandle? > > Thanks again, > > Casey > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe > Email to majordomo@pm.org: ACTION spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mcglk at serv.net Tue Sep 28 18:06:36 1999 From: mcglk at serv.net (Ken McGlothlen) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: caseyt@metaip.checkpoint.com's message of "Tue, 28 Sep 1999 14:32:15 -0700" References: Message-ID: <87k8pad4ar.fsf@ralf.serv.net> caseyt@metaip.checkpoint.com writes: | Is there some graceful way that I can reference an open filehandle in my main | script from the Perl module that has been called? Something pretty like | main::filehandle? It's possible, but awkward. Your best bet is to refer to "man perlref" and "man perldata", which explains all about these sorts of references. From the perlref page: [You can get a reference to a variable by] using the backslash operator on a variable, subroutine, or value. [...] Here are some examples: $scalarref = \$foo; $arrayref = \@ARGV; $hashref = \%ENV; $coderef = \&handler; $globref = \*foo; It isn't possible to create a true reference to an IO handle [...] using the backslash operator. The most you can get is a reference to a typeglob [...]. [...] Later on . . . A reference can [also] be created by using [...] the *foo{THING} syntax. [This] returns a reference to the THING slot in *foo (which is the symbol table entry which holds everything known as foo). $scalarref = *foo{SCALAR}; $arrayref = *ARGV{ARRAY}; $hashref = *ENV{HASH}; $coderef = *handler{CODE}; $ioref = *STDIN{IO}; $globref = *foo{GLOB}; All of these are self-explanatory except for *foo{IO}. It returns the IO handle, used for file handles (the open entry in the perlfunc manpage), sockets (the socket entry in the perlfunc manpage and the socketpair entry in the perlfunc manpage), and directory handles (the opendir entry in the perlfunc manpage). [...] *foo{THING} returns undef if that particular THING hasn't been used yet, except [...] *foo{SCALAR} returns a reference to an anonymous scalar if $foo hasn't been used yet. This might change in a future release. [...] So you could do something like this: sub get_record { my( $fh ) = shift; my( $s ) = <$fh>; return( $s ); } and then $record = &get_record( *HANDLE ); or $record = &get_record( *HANDLE{IO} ); to get what you want. ---Ken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From dougb at scalar.org Tue Sep 28 18:10:03 1999 From: dougb at scalar.org (Doug Beaver) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: ; from caseyt@metaip.checkpoint.com on Tue, Sep 28, 1999 at 02:32:15PM -0700 References: Message-ID: <19990928161002.A92061@scalar.org> On Tue, Sep 28, 1999 at 02:32:15PM -0700, caseyt@metaip.checkpoint.com wrote: [ snip ] > The solutions I can think of are: > > 1. Open and close the file handle every time I write to it. > 2. Have file handles open to the file in the module and the script at the > same time. > > Is there some graceful way that I can reference an open filehandle in my > main script from the Perl module that has been called? Something pretty like > main::filehandle? Filehandles are by definition globals, so you can't refer to it by package name (I did a quick grep of the pods and didn't see anything saying they weren't globals, so someone slap me if I'm wrong). OTOH, I think it's rather elegant/graceful/whatever to use Symbol::gensym() as follows: use strict; use Symbol qw/gensym/; my $fh = gensym; open($fh, ">>$file") || die "Can't open $file: $!"; ... write_lines($fh, $msg); sub write_lines { my ($fh, $msg) = @_; print $fh $msg; } __END__ You can find more documentation for Symbol by doing a `perldoc Symbol`. I've loved Symbol ever since I wrote a logging module that mysteriously wrote all log messages to a single log file once you were using more than one object per program: use DougbLog; my $error_log = DougbLog->new($error_log_path); my $blah_log = DougbLob->new($blah_log_path); ... $error_log->log("Invalid user input: %s", $input); $blah_log->log("heh heh"); __END__ Both error messages went to $blah_log_path because my constructor did this: package DougbLog; sub new { my $type = shift; my $class = ref($type) || $type; my $self = {}; my $logfile = shift; unless (open(LOG, ">>$logfile")) { warn "Couldn't open $logfile: $!"; return; } $self->{log_fh} = \*LOG; return bless $self => $class; } __END__ Since LOG is a global, each object's log_fh entry points to the last file opened for appending with the LOG filehandle (oops!). Generating a filehandle inside the constructor with Symbol::gensym() fixed my 'problem', and made me a hero. (Okay, I made the last part up...) I realize that not everyone is going to make stupid mistakes like me, but hopefully this will prevent someone from making the same one in the future. ;-) HTH, Doug -- Smithers: I'm afraid we have a bad image, Sir. Market research shows people see you as somewhat of an ogre. Burns: I ought to club them and eat their bones! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mcglk at serv.net Tue Sep 28 19:09:19 1999 From: mcglk at serv.net (Ken McGlothlen) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: jimfl's message of "Tue, 28 Sep 1999 15:59:24 -0700" References: <378670.3147523164@erdos.nwest.attws.com> Message-ID: <873dvyd1e8.fsf@ralf.serv.net> jimfl writes: | [...] | use FileHandle; | [...] Y'know, I really need to take a closer look at the available modules. :) ("Ach, *you* have it *easy*. Why in *my* day, we had to make variable references by counting the offset to the data on paper tape!") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From andy at n2h2.com Tue Sep 28 20:13:17 1999 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: <19990928161002.A92061@scalar.org> Message-ID: On Sep 28, 1999 @ 4:10pm, Doug Beaver wrote: :} Filehandles are by definition globals, so you can't refer to it by :} package name (I did a quick grep of the pods and didn't see anything :} saying they weren't globals, so someone slap me if I'm wrong). Eh? I thought that globals where in fact symbol table entries and thus available via the package name. Doug, say it ain't so! :) -- Andrew Sweger | N2H2, Incorporated v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400 "Intelligent Technologies For | Seattle WA 98164-1059 a Safe and Productive Internet" | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From dougb at scalar.org Tue Sep 28 20:38:51 1999 From: dougb at scalar.org (Doug Beaver) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules In-Reply-To: ; from Andrew Sweger on Tue, Sep 28, 1999 at 06:13:17PM -0700 References: <19990928161002.A92061@scalar.org> Message-ID: <19990928183851.A93772@scalar.org> On Tue, Sep 28, 1999 at 06:13:17PM -0700, Andrew Sweger wrote: > On Sep 28, 1999 @ 4:10pm, Doug Beaver wrote: > > :} Filehandles are by definition globals, so you can't refer to it by > :} package name (I did a quick grep of the pods and didn't see anything > :} saying they weren't globals, so someone slap me if I'm wrong). > > Eh? I thought that globals where in fact symbol table entries and thus > available via the package name. Doug, say it ain't so! :) Ack, I was completely wrong... You're right, globals go in the symbol table and as such can be accessed by package name: #!/usr/bin/perl open(F, ">blah") || die $!; my $fd = fileno(F); print "File descriptor is [$fd]\n"; package blah; my $fd = fileno(F); print "File descriptor is [$fd]\n"; my $mainfd = fileno(main::F); print "File descriptor is [$mainfd]\n"; 1; __END__ File descriptor is [3] File descriptor is [] File descriptor is [3] I hereby prostrate myself in front of the SPUG membership and humbly beg forgiveness for leading others astray, I don't know what I was thinking... The only thing I can offer in my defense is that I'm sick and had just woke up from a nice nap. ;-) So, please ignore my statement about not being able to refer to filehandles by package name, but please give Symbol::gensym() a try, it's a lot more lightweight than using FileHandle if all you want is an anonymous filehandle. I'm going to go back to bed now. ;-) Doug -- Smithers: I'm afraid we have a bad image, Sir. Market research shows people see you as somewhat of an ogre. Burns: I ought to club them and eat their bones! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From snickels at u.washington.edu Tue Sep 28 20:58:41 1999 From: snickels at u.washington.edu (S. Nickels) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Core files.... Message-ID: Hi everybody. I'm having trouble with a Tk script that I'm writing. The script runs like it is supposed to, but every once in a while it just randomly quits and dumps a core. I don't get any other error message, it just says "Segmentation fault (core dumped)" I tried gdb on the core, but it said it was an invalid format. Any advice for a confused soul? Thanks! --Steve Nickels --------------------------------------- Stephen Nickels snickels@u.washington.edu http://students.washington.edu/snickels --------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From charles.e.derykus at boeing.com Tue Sep 28 21:17:39 1999 From: charles.e.derykus at boeing.com (charles.e.derykus@boeing.com) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Looking for a graceful way to deal with file handles and modules Message-ID: <199909290217.TAA26290@carios2.ca.boeing.com> > Ack, I was completely wrong... You're right, globals go in the symbol > table and as such can be accessed by package name: > #!/usr/bin/perl > open(F, ">blah") || die $!; > my $fd = fileno(F); > print "File descriptor is [$fd]\n"; > package blah; > my $fd = fileno(F); > print "File descriptor is [$fd]\n"; > my $mainfd = fileno(main::F); > print "File descriptor is [$mainfd]\n"; > 1; > __END__ > File descriptor is [3] > File descriptor is [] > File descriptor is [3] typeglobs still give me the willies :) For instance, here're some magic that only the magician could love: print STDOUT "foo"; # ok print main::STDOUT "foo"; # ok print *STDOUT "foo"; # error print \*STDOUT "foo"; # error but, surround 'em with curly braces, and there're fine: print { *STDOUT } "foo"; # ok print { \*STDOUT } "foo"; # ok Seeing that, you might logically think: open(STDOUT, "+ Message-ID: On 28 Sep 1999, Ken McGlothlen wrote: > Y'know, I really need to take a closer look at the > available modules. :) > > ("Ach, *you* have it *easy*. Why in *my* day, we had to > make variable references by counting the offset to the > data on paper tape!") I've globbed enough filehandles in my day.... :) Why, I remember joins and splits on $; to emulate multidimensional arrays. Plegh! -- Jim Flanagan Collective Technologies jimfl@colltech.com http://www.colltech.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From mcglk at serv.net Wed Sep 29 00:13:32 1999 From: mcglk at serv.net (Ken McGlothlen) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Core files.... In-Reply-To: "S. Nickels"'s message of "Tue, 28 Sep 1999 18:58:41 -0700 (PDT)" References: Message-ID: <871zbiqozn.fsf@ralf.serv.net> "S. Nickels" writes: | Hi everybody. I'm having trouble with a Tk script that I'm writing. The | script runs like it is supposed to, but every once in a while it just | randomly quits and dumps a core. I don't get any other error message, it | just says "Segmentation fault (core dumped)" I tried gdb on the core, but it | said it was an invalid format. | | Any advice for a confused soul? I dunno, Steve; you seem to be pretty confused. Considering that you're posting a Tk question to a Perl users group list, failed to include the script, any information about the script, how you're running it, on what platform---in fact, failing to post any useful or relevant information whatsoever---it seems vanishingly likely that you can be helped by anyone here. But best of luck! :) ---Ken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From devin at premier1.net Wed Sep 29 00:50:08 1999 From: devin at premier1.net (Devin L. Ganger) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Core files.... In-Reply-To: <871zbiqozn.fsf@ralf.serv.net> Message-ID: On 28 Sep 1999, Ken McGlothlen wrote: > I dunno, Steve; you seem to be pretty confused. Considering that you're > posting a Tk question to a Perl users group list Perhaps it's a Perl/Tk script? -- Devin L. Ganger, Chief Systems Administrator, Premier1 Internet Services "Pisces!.... Weird Al Yankovic You are the true Lord of the Dance, no "Your Horoscope For Today" matter what those idiots at work say." _Running with Scissors_ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From snickels at u.washington.edu Wed Sep 29 01:38:45 1999 From: snickels at u.washington.edu (S. Nickels) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Core files.... (fwd) Message-ID: Yes, that's correct. Perl/Tk. Sorry, didn't make that quite clear. I didn't include the script because I didn't believe it was part of the problem. The script was running correctly, without error messages, save the core dumps. I assumed the problem was the perl interpreter; it was dumping a core file that was apparently of invalid form. What I wanted to know was if perl core files are different in some way, and how one might use the core file to diagnose what may have been the problem. Again, sorry for not being clear. --Steve Nickels > I dunno, Steve; you seem to be pretty confused. Considering that you're > posting a Tk question to a Perl users group list Perhaps it's a Perl/Tk script? -- Devin L. Ganger, Chief Systems Administrator, Premier1 Internet Services "Pisces!.... Weird Al Yankovic You are the true Lord of the Dance, no "Your Horoscope For Today" matter what those idiots at work say." _Running with Scissors_ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From storer at bcstec.ca.boeing.com Wed Sep 29 12:50:38 1999 From: storer at bcstec.ca.boeing.com (Karen Storer) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Core files.... Message-ID: <199909291750.KAA09673@bcstec.ca.boeing.com> > ...every once in a while it just > randomly quits and dumps a core. I don't get any other error message, it > just says "Segmentation fault (core dumped)" I've seen this behavior when a Solaris machine has used up all its physical and virtual memory. I checked Sun's online documentation and found this: Segmentation Fault Cause Segmentation faults usually result from programming error. This message is usually accompanied by a core dump, except on read-only filesystems. Action To see which program produced a core file, run either the file(1) command or the adb(1) command. The following examples show the output of the file and adb commands on a core file from the dtmail program. $ file core core: ELF 32-bit MSB core file SPARC Version 1, from 'dtmail' $ adb core core file = core P program'dtmail' SIGSEGV 11: segmentation violation ^D (use Control-d to quit the adb rogram) Ask the vendor or author of this program for a debugged version. Technical Notes A process has received a signal indicating that it attempted to access an area of memory that is protected or that does not exist. The two most common causes of segmentation faults are attempting to dereference a null pointer or indexing past the bounds of an array. (From the "Solaris Common Messages and Troubleshooting Guide" online at http://docs.sun.com:80, found in the Sys Admin AnswerBook Collection Vol 2 for Solaris 2.6) Karen Storer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From ChrisM at courtlink.com Wed Sep 29 14:12:39 1999 From: ChrisM at courtlink.com (Christopher Maujean) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: Core files.... (fwd) Message-ID: <01AC88DAEF3FD311A8980050048273000213F3@hqmsx01.internal.courtlink.com> As it seems vanishingly likley that you will get any help here... :) I will throw my .02$ in: I get the same general problem and have just been dealing with it. (my Perl/Tk scripts are not of production importance) However, if you find this an unbearable problem I would suggest: Try acheiving the same functionality in a non pTk manner and see if that eliminatates the core dumps. If so, post the question to the Perl/Tk mailing list and perhaps Nick Ing-Simmons (Perl/Tk author) can tell you why its the fault of Perl/Tk, and not just Perl... The pTk list is: ptk@lists.stanford.edu --Christopher ----------------- #--------------------- #!/usr/local/bin/perl print uc(((split //, " CourtLink Christopher Maujean Senior Perl Developer http://www.courtlink.com 425.974.5000 229 ")[$_]))foreach (0,28,27,17,18,24,30,31,38,58,57,53, 54,40,41,42,43,44,45,14,26,13,10,22, 23,32); __END__ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Sep 30 16:46:04 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: We Need a New HOME! Message-ID: <199909302146.OAA05346@consultix.wa.com> >> Message submitted at: Thu Sep 30 14:46:04 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1900 SPUGers, We've had a good run in the great conference room at Fred's Cancer Center, but all good things come to an end, and so has our free ride at this location. (Darn! Just when some of us were starting to think that we'd finally figured out the data projector! 8-} .) We'll be allowed to stay through December, but after that, they'll want $100 from us for each meeting. So we have a decision to make: 1) either start collecting dues, managing accounts, and making rent payments, or 2) find a free alternative location. I'm in favor of trying Option #2 first, which is where you, the members, come in! If your company has a meeting room that you think we might be able to use, please ask about its availability for our monthly meetings. Thus far we've been meeting on 3rd Tuesdays, which I think should remain our first choice, but we could shift to a different schedule if necessary. Also, I recommend we consider all possible venues; that includes the grungy meeting room with the rickety chairs at your company, and the super-deluxe Internet-equipped state of the art room at somebody else's company. Naturally, we'll choose the best from our available alternatives, considering location in addition to outfitting, but please don't anybody refrain from asking for a particular room just because you think we should be able to find a fancier one - that might not be true! Now I'll sit back and wait for all your emails containing offers of meeting rooms to roll in . . . *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |Classes: 11/1 Shell/Utils 11/15 Adv Shell 12/7 LINUX 12/13 Perl| *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From tim at consultix-inc.com Thu Sep 30 17:40:17 1999 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: We Need a New HOME! In-Reply-To: <199909302146.OAA05346@consultix.wa.com> from "Tim Maher/CONSULTIX" at Sep 30, 99 02:46:04 pm Message-ID: <199909302240.PAA05515@consultix.wa.com> >> Message submitted at: Thu Sep 30 15:40:17 PDT 1999 X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1000 SPUGers, In response to several recent inquiries, here is a list of the attributes I'd like to see in a meeting room; anybody else want to chime in with additional desiderata? (For those of you who weren't tortured by Catholic nuns in childhood, that means "desirable properties"): Minimum Requirements: easy highway access accommodation for 25 persons central to high-tech work locations (Bellevue, Downtown Seattle) near restaurants/bars for post-meeting meetings Better: Overhead Projector & Screen White-Boards Even Better: Internet access data projector comfy chairs *==================================================================* | Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc. Email: tim@consultix-inc.com | | "The UNIX/Perl Training Experts" http://www.consultix-inc.com | |Classes: 11/1 Shell/Utils 11/15 Adv Shell 12/7 LINUX 12/13 Perl| *==================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From davidpa at mosaix.com Thu Sep 30 22:30:50 1999 From: davidpa at mosaix.com (Patterson, David) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: We Need a New HOME! Message-ID: Hi, I'm Dave Patterson of Lucent Technologies, Inc. in downtown Redmond (Formerly of Mosaix, Inc.). The location may be a bit "east" for many people (520 and Redmond Way), but... Currently we host the NW C++ Users group one evening a month in one of our conference rooms. We can host up to appx 35 people comfortably. I would be happy to make arrangements for SPUG to have monthly meetings in our facilities if you are interested. Might even be able to have free refreshments served (I'll have to double check on that!!). I think our facilities meet your minimum requirements; internet access can be arranged in advance if needed. Let me know what you think, > "Capt'n! The spellchecker kinna take this abuse!..." > > David Patterson > Software Engineer > Lucent Technologies, Inc. > 6464 185th Ave NE > Redmond, WA 98052-6736 > 425-558-8008 x 2172 > 206-980-0550 Pgr > davidpa@lucent.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From Richard.Anderson at seaslug.org Thu Sep 30 14:44:06 1999 From: Richard.Anderson at seaslug.org (Richard Anderson) Date: Wed Aug 4 00:09:33 2004 Subject: SPUG: RE: Looking for a good ISP Message-ID: <019501bf0b7c$2c40aeb0$dc87c7cd@adcom133> A while ago I posted a query to this list asking for recommendations on ISPs. I am happy to report that an excellent suggestion steered me to www.zipcon.net . The owner/sysadmin is a Linux/Apache advocate, and he installs system software (pdksh, Perl modules) the SAME DAY I send the request, even when I e-mail him after business hours! Contrary to one response I got from this list, my expectations of price and service were not unattainable: the base $20 dial-up package comes with unlimited connect time, 20 MB of disk space, 250 MB/month web bandwidth, and full CGI support with Apache setuid configured so my scripts run as processes owned by my userid. And the webserver response time is more than twice as fast as Halcyon's. Web domain name hosting is only an additional $10 / month, in contrast to Halycon's $95 / month. Zipcon is so responsive that I am confident that their servers would be back up in less than an hour of going down. But they haven't had any downtime yet. Richard.Anderson@seaslug.org www.zipcon.com/~starfire/home (personal) www.raycosoft.com (corporate) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address From moonbeam at catmanor.com Thu Sep 30 23:13:50 1999 From: moonbeam at catmanor.com (William Julien) Date: Wed Aug 4 00:09:35 2004 Subject: SPUG: perl to be re-written in c++? Message-ID: <199910010413.VAA14347@catmanor.com> Perl to be rewritten in c++ ? "So, we're left with C++. It's rather like the comment that I believe Winston Churchill is reported to have said about democracy: It's absolutely the worst system except for all the others. So, C++ is the worst language we could have chosen, except for all the others." Be afraid -- be very afraid. http://www.perl.com/pub/1999/09/topaz.html?wwwrrr_19990928.txt _,'| _.-''``-...___..--'; /, \'. _..-' , ,--...--''' < \ .`--''' ` /| William Julien moonbeam@catmanor.com `-,;' ; ; ; http://www.catmanor.com/moonbeam/ __...--'' __...--_..' .;.' vi is my shepherd; i shall not font. (,__....----''' (,..--'' perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe Email to majordomo@pm.org: ACTION spug-list your_address