From lbartels at ptiglobal.com Fri Jun 1 12:29:41 2001 From: lbartels at ptiglobal.com (Leuth Bartels) Date: Wed Aug 4 00:05:20 2004 Subject: Damian Conway free presentation in portland - your input needed Message-ID: <11837FE741B1D111B3490000C042C0D629409F@NTSERVER> Oh, I'm a silly bugger! I sent this to an individual instead of the group (must be time for more coffee!) Mr. Kuskie, I apologize for the confusion!!! Leuth Bartels Translation Software Manager PTIGlobal tel: 503.297.2165 fax: 503.297.0655 email: lbartels@ptiglobal.com -----Original Message----- From: Leuth Bartels Sent: Friday, June 01, 2001 10:27 AM To: 'Colin Kuskie' Subject: RE: Damian Conway free presentation in portland - your input needed Hello to the group, I am interested in learning PERL and have been following messages on this list for some time as a means of garnering information. Would it be inappropriate of me to attend one of the group gathering sessions, even though I am only an *aspiring* PERL monger? I have very particular needs (as I am Translation Software Mgr for small localization firm, working almost entirely with not-quite-perfect CATM software that requires a lot of extra care which I have been told PERL could make much simpler etc etc...) and so would love some advice on how/where to focus my study when I begin cracking the books, as well as some potential contacts in the states since my other big PERL buddy is wonderful a gentleman in Croatia (!!) I would like to take actual classes in PERL (I think) and am wondering if the Damian Conway classes would be too far over my head. I am also more than willing to pay for any *tutoring* (with beer or even real money.) Thank you all for your time, Leuth Bartels Translation Software Manager PTIGlobal tel: 503.297.2165 fax: 503.297.0655 email: lbartels@ptiglobal.com -----Original Message----- From: Colin Kuskie [mailto:ckuskie@tality.com] Sent: Wednesday, May 30, 2001 10:08 AM To: pdx-pm-list@pm.org Subject: Re: Damian Conway free presentation in portland - your input needed On 29 May 2001, Randal L. Schwartz wrote: > Oh, sorry. I meant to include the link. cpd.ogi.edu. If you search > for "Damian", you'll find his classes. If you search for > "Stonehenge", you'll find both his and ours. WooHoo! Just got a P.O. approved from the wife to spend some fun money on the Text Munging course. My day job is designing analog chips and I've never been exposed to parsers before. This should be a blast! Thanks for the tip! Colin p.s. Maybe we should list places where Perl training is locally offered on the portland.pm.org website? TIMTOWTDI TIMTOWTDI From cp at onsitetech.com Fri Jun 1 12:59:26 2001 From: cp at onsitetech.com (Curtis Poe) Date: Wed Aug 4 00:05:20 2004 Subject: Damian Conway free presentation in portland - your input needed References: <11837FE741B1D111B3490000C042C0D629409F@NTSERVER> Message-ID: <001b01c0eac4$98c43920$1a01a8c0@ot.onsitetech.com> Leuth Bartels wrote: > Would it be > inappropriate of me to attend one of the group gathering sessions, even > though I am only an *aspiring* PERL monger? Well, I suppose there would actually have to *be* "group gathering sessions." I've only attended two Perl Mongers meetings and both of those were in Amsterdam. Needless to say, I'd rather not have to travel to Europe to attend said meetings. Amsterdam.pm had Perl programmers of all levels (Johan Vromans, Abigail, and lowly ol' me, amongst others), so I suspect that Portland.pm, if it ever meets, would have no problem with your attending. > I would like to take actual classes in PERL (I think) and am wondering if > the Damian Conway classes would be too far over my head. I am also more > than willing to pay for any *tutoring* (with beer or even real money.) Not having attended any of his classes, I am only hazarding a guess, but I suspect that much of the beauty of his classes would be lost without at least an intermediate knowledge of Perl. The code that he writes is very impressive, but not for the faint of heart. On the other hand, I also understand that his talks are very humorous, so it may be worth it. Cheers, Curtis A. Poe Senior Programmer ONSITE! Technology http://www.onsitetech.com/ "Ovid" on http://www.perlmonks.org/ "If I heard a voice from heaven say 'Live without loving', I'd beg off. Girls are such exquisite hell." -- Publius Ovidius Naso, "Ovid" TIMTOWTDI From protek_2000 at yahoo.com Fri Jun 1 14:05:31 2001 From: protek_2000 at yahoo.com (Michael Mitchell) Date: Wed Aug 4 00:05:20 2004 Subject: Damian Conway free presentation in portland - your input needed In-Reply-To: <001b01c0eac4$98c43920$1a01a8c0@ot.onsitetech.com> Message-ID: Hello, I too suffer from pre-monger syndrome. What are the recommended local sources of dealing with the condition? What stage of self-organization are the pm's of Portland? Meetings likely in the near or far future? Appreciate the dialogue here. Michael Mitchell http://www.dgsoft.com/protek -----Original Message----- From: owner-pdx-pm-list@pm.org [mailto:owner-pdx-pm-list@pm.org]On Behalf Of Curtis Poe Sent: Friday, June 01, 2001 10:59 AM To: pdx-pm-list@pm.org Subject: Re: Damian Conway free presentation in portland - your input needed Leuth Bartels wrote: > Would it be > inappropriate of me to attend one of the group gathering sessions, even > though I am only an *aspiring* PERL monger? Well, I suppose there would actually have to *be* "group gathering sessions." I've only attended two Perl Mongers meetings and both of those were in Amsterdam. Needless to say, I'd rather not have to travel to Europe to attend said meetings. Amsterdam.pm had Perl programmers of all levels (Johan Vromans, Abigail, and lowly ol' me, amongst others), so I suspect that Portland.pm, if it ever meets, would have no problem with your attending. > I would like to take actual classes in PERL (I think) and am wondering if > the Damian Conway classes would be too far over my head. I am also more > than willing to pay for any *tutoring* (with beer or even real money.) Not having attended any of his classes, I am only hazarding a guess, but I suspect that much of the beauty of his classes would be lost without at least an intermediate knowledge of Perl. The code that he writes is very impressive, but not for the faint of heart. On the other hand, I also understand that his talks are very humorous, so it may be worth it. Cheers, Curtis A. Poe Senior Programmer ONSITE! Technology http://www.onsitetech.com/ "Ovid" on http://www.perlmonks.org/ "If I heard a voice from heaven say 'Live without loving', I'd beg off. Girls are such exquisite hell." -- Publius Ovidius Naso, "Ovid" TIMTOWTDI _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com TIMTOWTDI From markmoon at teleport.com Sat Jun 2 16:00:51 2001 From: markmoon at teleport.com (MarkyMoon) Date: Wed Aug 4 00:05:20 2004 Subject: Newbie with RegEx question Message-ID: <3B1953F5.B0958255@teleport.com> Hi everyone, Now that things are starting to make a little more sense to me, I've been going through the llama book (again) and I'm having a bit of a problem understanding why (abc)* will match a null set "" (in addition to abc,abcabc, abcabcabc etc.)... and WHY would you WANT to define a pattern that has the possiblility of matching nothing? I can't think why that would be useful. Any hints would be mucho appreciado. This is stated in section dealing with Regular Expressions:Precedence (page 84). I keep looking at it but now the page is just getting fuzzy and I may cry soon. Thanks in advance, Mark Smith -- My very first japh's! (Sure... they're not fancy, but I'm a graphic designer dang-it!) -- @a = ("a".."z"," ","-","\n");foreach $b ( 12,0,17,10,24,12,14,14,13,26,8,18,26,0,26, 22,0,13,13,0,27,1,4,26,15,4,17,11,26,7,0, 2,10,4,17) {print "$a[$b]"};print $a[28]; --numero dos -- @a = ("a".."z"," ",",","\n","!");foreach $b ( 28,0,26,14,13,4,26,11,26,17,0,13,3,0,11,26,22,17,14,19,4,26,19,7,4,26,1,14,14,10,27,28, 0,26,19,22,14,26,11,26,11,11,0,12,0,26,5,14,17,26,19,7,4,26,11,14,14,10,27,28, 1,20,19,26,19,14,26,22,7,14,12,26,22,4,26,14,22,4,26,8,19,26,0,11,11,27,28, 8,18,26,19,7,4,26,19,7,17,4,4,26,11,26,11,0,17,17,24,26,22,0,11,11,29,28,28, 17,0,13,3,0,11,28) {print "$a[$b]"};print $a[28]; TIMTOWTDI From merlyn at stonehenge.com Sat Jun 2 16:12:52 2001 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Wed Aug 4 00:05:20 2004 Subject: Newbie with RegEx question In-Reply-To: <3B1953F5.B0958255@teleport.com> References: <3B1953F5.B0958255@teleport.com> Message-ID: >>>>> "MarkyMoon" == MarkyMoon writes: MarkyMoon> Now that things are starting to make a little more sense to me, MarkyMoon> I've been going through the llama book (again) and I'm having a bit MarkyMoon> of a problem understanding why MarkyMoon> (abc)* MarkyMoon> will match a null set "" (in addition to abc,abcabc, abcabcabc MarkyMoon> etc.)... By definition. zero or more times. zero is one of that. :) MarkyMoon> and WHY would you WANT to define a pattern that has the MarkyMoon> possiblility of matching nothing? Why would you want to define a pattern that matches /my hovercraft is full of eels/ ? Or stated in a different way, why would you want to make an exception to the rules, and if so, how would you except it? It'd be like defining a programming language that could only make "sensible" programs, and disallowed "$a = $a;". It's just not really practical to have those exceptions. By the way /^/ also matches a null string, but only if it occurs at the beginning of the string. Similarly, /$/ also matches a null string, but only if it occurs at the end of the target string. So be careful when you start disallowing null string matches. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! TIMTOWTDI From markmoon at teleport.com Sat Jun 2 16:47:38 2001 From: markmoon at teleport.com (MarkyMoon) Date: Wed Aug 4 00:05:20 2004 Subject: Newbie with RegEx question References: <3B1953F5.B0958255@teleport.com> Message-ID: <3B195EF9.B9EB75B5@teleport.com> > >>>>> "MarkyMoon" == MarkyMoon wrote without thinking it through:( > MarkyMoon> of a problem understanding why > > MarkyMoon> (abc)* > > MarkyMoon> will match a null set "" (in addition to abc,abcabc, abcabcabc But "Randal L. Schwartz" answered anyway: > > By definition. zero or more times. zero is one of that. :) > I'm sorry. I kind of got it into my head that * matched _any_ occurrence of ... not _zero or more_ occurrences. I'm embarrassed and promise to double check myself from now on. Or at least my books. >"Randal L. Schwartz" > So be > careful when you start disallowing null string matches. :) I promise! Thanks, Mark -- My very first japh's! (Sure... they're not fancy, but I'm a graphic designer dang-it!) -- @a = ("a".."z"," ","-","\n");foreach $b ( 12,0,17,10,24,12,14,14,13,26,8,18,26,0,26, 22,0,13,13,0,27,1,4,26,15,4,17,11,26,7,0, 2,10,4,17) {print "$a[$b]"};print $a[28]; --numero dos -- @a = ("a".."z"," ",",","\n","!");foreach $b ( 28,0,26,14,13,4,26,11,26,17,0,13,3,0,11,26,22,17,14,19,4,26,19,7,4,26,1,14,14,10,27,28, 0,26,19,22,14,26,11,26,11,11,0,12,0,26,5,14,17,26,19,7,4,26,11,14,14,10,27,28, 1,20,19,26,19,14,26,22,7,14,12,26,22,4,26,14,22,4,26,8,19,26,0,11,11,27,28, 8,18,26,19,7,4,26,19,7,17,4,4,26,11,26,11,0,17,17,24,26,22,0,11,11,29,28,28, 17,0,13,3,0,11,28) {print "$a[$b]"};print $a[28]; TIMTOWTDI From kellert at ohsu.edu Mon Jun 11 16:31:36 2001 From: kellert at ohsu.edu (Tom Keller) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef Message-ID: Hi all, I'm confused about the use of undef. I want to count the number of elements in a list until the first undefined value. I tried this: @array = (0, 1, 2, , "next", "group"); ELEMENTS: foreach $element (@array) { $count++; last ELEMENTS if $element eq undef; } It gives me the correct count, 3, and leaves the loop correctly, but I get a warning for each element. What am I missing? Thanks, Tom Keller TIMTOWTDI From tex at off.org Mon Jun 11 17:29:05 2001 From: tex at off.org (Austin Schutz) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: ; from kellert@ohsu.edu on Mon, Jun 11, 2001 at 02:31:36PM -0700 References: Message-ID: <20010611152905.D908@gblx.net> On Mon, Jun 11, 2001 at 02:31:36PM -0700, Tom Keller wrote: > Hi all, > I'm confused about the use of undef. > I want to count the number of elements in a list until the first undefined value. > I tried this: > @array = (0, 1, 2, , "next", "group"); > ELEMENTS: foreach $element (@array) { > $count++; > last ELEMENTS if $element eq undef; > } > It gives me the correct count, 3, and leaves the loop correctly, but I get a warning for each element. > What am I missing? > undef is an actual value and takes up a space in the array. You can't test for it using eq, since that will try to do a string comparison. undef is not the same thing as the defined string ''. Use defined() where applicable. You should also take a look at exists() for testing whether or not there is a given key in a hash. Try this: @array = (0, 1, 2, undef , , "next", "group"); ELEMENTS: foreach $element (@array) { $count++; last ELEMENTS if ! defined( $element ); } print $count; ( I get 4, ymmv. :-) ) Austin TIMTOWTDI From belman at subdimension.com Wed Jun 13 02:29:34 2001 From: belman at subdimension.com (Erik Hollensbe) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef References: Message-ID: <006201c0f3da$985066c0$d738f818@potlnd1.or.home.com> austin already replied about defined(), but you may find that something along these lines would solve your problem much cleaner than a GOTO: @array(0..2, ,undef); $count = 0; # not needed unless use strict while(1) { defined($array[$count]) ? $count++ : last }; also note that 'scalar @array' (or just @array in scalar context) will return the number of elements in an array. hope it helps, Erik Hollensbe ----- Original Message ----- From: "Tom Keller" To: Sent: Monday, June 11, 2001 2:31 PM Subject: use of undef > Hi all, > I'm confused about the use of undef. > I want to count the number of elements in a list until the first undefined value. > I tried this: > @array = (0, 1, 2, , "next", "group"); > ELEMENTS: foreach $element (@array) { > $count++; > last ELEMENTS if $element eq undef; > } > It gives me the correct count, 3, and leaves the loop correctly, but I get a warning for each element. > What am I missing? > > Thanks, > Tom Keller > TIMTOWTDI > TIMTOWTDI From masque at pound.perl.org Wed Jun 13 10:38:56 2001 From: masque at pound.perl.org (Masque) Date: Wed Aug 4 00:05:20 2004 Subject: use of under Message-ID: <20010613103856.E11675@pound.perl.org> ----- Forwarded message from owner-pdx-pm-list@pm.org ----- Date: Wed, 13 Jun 2001 10:32:16 -0500 From: owner-pdx-pm-list@pm.org X-Authentication-Warning: gocho.pm.org: majordomo set sender to owner-pdx-pm-list@pm.org using -f To: pdx-pm-list-approval@pm.org Subject: BOUNCE pdx-pm-list@pm.org: Non-member submission from [Tom Phoenix ] From rootbeer at redcat.com Wed Jun 13 10:27:13 2001 From: rootbeer at redcat.com (Tom Phoenix) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: <006201c0f3da$985066c0$d738f818@potlnd1.or.home.com> Message-ID: On Wed, 13 Jun 2001, Erik Hollensbe wrote: > austin already replied about defined(), but you may find that something > along these lines would solve your problem much cleaner than a GOTO: GOTO? Who is using GOTO? > @array(0..2, ,undef); I think you omitted an equals sign here. > $count = 0; # not needed unless use strict No, if you have 'use strict' enabled, you would need to declare these variables; that line wouldn't accomplish that. If you have warnings enabled, you would need to initialize $count before using it as an array index, though; that's probably what you were thinking of. > while(1) { defined($array[$count]) ? $count++ : last }; Real Perl programmers don't use subscripts. :-) It's almost certainly more efficient to use a foreach loop on the array. Also, I prefer not to use the ?: operator as a control structure, since it is harder to understand (and potentially less efficient) than a simple if/else would be. Hope this helps! -- Tom Phoenix Perl Training and Hacking Esperanto Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ ----- End forwarded message ----- TIMTOWTDI From masque at pound.perl.org Wed Jun 13 10:39:33 2001 From: masque at pound.perl.org (Masque) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef Message-ID: <20010613103933.F11675@pound.perl.org> ----- Forwarded message from owner-pdx-pm-list@pm.org ----- Date: Mon, 11 Jun 2001 18:42:07 -0500 From: owner-pdx-pm-list@pm.org X-Authentication-Warning: gocho.pm.org: majordomo set sender to owner-pdx-pm-list@pm.org using -f To: pdx-pm-list-approval@pm.org Subject: BOUNCE pdx-pm-list@pm.org: Non-member submission from [Tom Phoenix ] From rootbeer at redcat.com Mon Jun 11 18:37:14 2001 From: rootbeer at redcat.com (Tom Phoenix) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: <20010611152905.D908@gblx.net> Message-ID: On Mon, 11 Jun 2001, Austin Schutz wrote: > > @array = (0, 1, 2, , "next", "group"); > @array = (0, 1, 2, undef , , "next", "group"); Note that the "empty element" between those two consecutive commas in both cases is _not_ an undefined value. It's just a syntactic quirk that Perl forgives extra commas in a list, if you want to think of it that way. So the first line of code puts five elements into @array, while the second supplies six. > ELEMENTS: foreach $element (@array) { > $count++; > last ELEMENTS if ! defined( $element ); > } > print $count; > > ( I get 4, ymmv. :-) ) Of course, you're counting also the undefined element, because you increment before you check whether it's defined or not. That's okay, but the original request is ambiguous. If you want "the number of elements before undef" and you're talking about the list (1, 2, 3), the answer could either be three or zero, right? So this sub may or may not do what is really wanted: sub number_before_undef { # Returns the number of elements found before an undef value # in the parameter list. If there's no undef value, returns # undef. my $count = 0; foreach (@_) { return $count if not defined $_; $count++; } # There was no undef found, so.... return undef; } my @array = ("fred", , "barney", "wilma", (), "betty", "undef", "just kidding!", undef, 3, "fred", "wilma", "betty", 2..10, undef, "yes, again"); my $num = number_before_undef @array; if (defined $num) { print "There were $num items before undef in the list.\n"; } else { print "No undef found in that list.\n"; } Hope this helps! -- Tom Phoenix Perl Training and Hacking Esperanto Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ ----- End forwarded message ----- TIMTOWTDI From belman at subdimension.com Wed Jun 13 21:45:15 2001 From: belman at subdimension.com (Erik Hollensbe) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: Message-ID: <20010613194515.A524@subdimension.com> heh, it was late. this is what I deserve I guess for not checking my code before I post it to the list :) On Wed, Jun 13, 2001 at 08:27:13AM -0700, Tom Phoenix wrote: > On Wed, 13 Jun 2001, Erik Hollensbe wrote: > > > austin already replied about defined(), but you may find that something > > along these lines would solve your problem much cleaner than a GOTO: > > GOTO? Who is using GOTO? the label was superfluous - why not just include the comparison in the loop instead? a traditional for would have been another way to accomplish such a feat. for($count = 0; defined $array[$count]; $count++) { undef; }; unfortunately, perl doesn't allow loops without blocks. > > > @array(0..2, ,undef); > > I think you omitted an equals sign here. > > > $count = 0; # not needed unless use strict > > No, if you have 'use strict' enabled, you would need to declare these > variables; that line wouldn't accomplish that. If you have warnings > enabled, you would need to initialize $count before using it as an array > index, though; that's probably what you were thinking of. > see the first line I wrote :) > > while(1) { defined($array[$count]) ? $count++ : last }; > > Real Perl programmers don't use subscripts. :-) It's almost certainly more > efficient to use a foreach loop on the array. Also, I prefer not to use > the ?: operator as a control structure, since it is harder to understand > (and potentially less efficient) than a simple if/else would be. > i frankly cannot see how a foreach() could be any more efficient than a while(1) and a ?:, as there is no list to parse and/or watch for modifications. ?: is no different than an if() { } else { } comparison anyways. The Deparse pragma would show that your foreach() is being turned into a while() anyways. (with subscripts, no less) -- Erik Hollensbe belman@subdimension.com TIMTOWTDI From belman at subdimension.com Thu Jun 14 03:13:14 2001 From: belman at subdimension.com (Erik Hollensbe) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef Message-ID: <20010614011314.A399@subdimension.com> heh, it was late. this is what I deserve I guess for not checking my code before I post it to the list :) On Wed, Jun 13, 2001 at 08:27:13AM -0700, Tom Phoenix wrote: > On Wed, 13 Jun 2001, Erik Hollensbe wrote: > > > austin already replied about defined(), but you may find that something > > along these lines would solve your problem much cleaner than a GOTO: > > GOTO? Who is using GOTO? the label was superfluous - why not just include the comparison in the loop instead? a traditional for would have been another way to accomplish such a feat. for($count = 0; defined $array[$count]; $count++) { undef; }; unfortunately, perl doesn't allow loops without blocks. > > > @array(0..2, ,undef); > > I think you omitted an equals sign here. > > > $count = 0; # not needed unless use strict > > No, if you have 'use strict' enabled, you would need to declare these > variables; that line wouldn't accomplish that. If you have warnings > enabled, you would need to initialize $count before using it as an array > index, though; that's probably what you were thinking of. > see the first line I wrote :) > > while(1) { defined($array[$count]) ? $count++ : last }; > > Real Perl programmers don't use subscripts. :-) It's almost certainly more > efficient to use a foreach loop on the array. Also, I prefer not to use > the ?: operator as a control structure, since it is harder to understand > (and potentially less efficient) than a simple if/else would be. > i frankly cannot see how a foreach() could be any more efficient than a while(1) and a ?:, as there is no list to parse and/or watch for modifications. ?: is no different than an if() { } else { } comparison anyways. The Deparse pragma would show that your foreach() is being turned into a while() anyways. (with subscripts, no less) -- Erik Hollensbe belman@subdimension.com TIMTOWTDI From tex at off.org Thu Jun 14 12:57:49 2001 From: tex at off.org (Austin Schutz) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: <20010614011314.A399@subdimension.com>; from belman@subdimension.com on Thu, Jun 14, 2001 at 01:13:14AM -0700 References: <20010614011314.A399@subdimension.com> Message-ID: <20010614105749.B3001@gblx.net> while($horse->dead()) { $horse->beat(); } Why monkey with a user's code if it does what they want? There's usually a better/more efficient/whatever way of doing just about anything. Notice the standard signature. *shrug* I dunno. I just think we spend a lot of time splitting hairs. vvvvvvvvvv TIMTOWTDI From rb-pdx-pm at redcat.com Thu Jun 14 13:19:08 2001 From: rb-pdx-pm at redcat.com (Tom Phoenix) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: <20010614011314.A399@subdimension.com> Message-ID: On Thu, 14 Jun 2001, Erik Hollensbe wrote: > a traditional for would have been another way to > accomplish such a feat. > > for($count = 0; defined $array[$count]; $count++) { undef; }; Yes, but you're using indexing, which is not where Perl's strength lies. A foreach will generally be faster. > unfortunately, perl doesn't allow loops without blocks. I think you're talking about how you put undef inside the curly braces of that for loop. But you could have omitted that. Of course, you can have loops without blocks. > > > while(1) { defined($array[$count]) ? $count++ : last }; > > > > Real Perl programmers don't use subscripts. :-) It's almost certainly more > > efficient to use a foreach loop on the array. Also, I prefer not to use > > the ?: operator as a control structure, since it is harder to understand > > (and potentially less efficient) than a simple if/else would be. > i frankly cannot see how a foreach() could be any more efficient than > a while(1) and a ?:, as there is no list to parse and/or watch for > modifications. What list, what parsing, and what modifications are you talking about? It sounds as if you think perl is doing something in a foreach loop that would make that _very_ inefficient! > The Deparse pragma would show that your foreach() is being turned into > a while() anyways. (with subscripts, no less) I am unable to replicate this. Could you show me what you mean? -- Tom Phoenix Perl Training and Hacking Esperanto Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ TIMTOWTDI From robb at empire2.com Thu Jun 14 13:22:59 2001 From: robb at empire2.com (Rob Bloodgood) Date: Wed Aug 4 00:05:20 2004 Subject: use of undef In-Reply-To: <20010614105749.B3001@gblx.net> Message-ID: > while($horse->dead()) { $horse->beat(); } Wow, I've been looking for that! Is it on CPAN yet? > Why monkey with a user's code if it does what they want? There's > usually a better/more efficient/whatever way of doing just about anything. Absolutely. I, being an accomplished Perl programmer, appreciate others' input on possible different approaches. TIMTOWTDI is understood, and acknowledged. But the BEST (or should I say, BETTER) way to do something IN CONTEXT (this *IS* perl :-) depends on where and when. > *shrug* I dunno. I just think we spend a lot of time > splitting hairs. Not, splitting hairs... evaluating the strengths of different syntaxes in different usages. I'm a _programmer_, not a Perl user/Java user/C user/PLSQL user/Shell user. When presented with a task, my job is to get data from point A to point B. Everything else is just learning the available toolset to accomplish that. Understanding the subtleties of the toolset's capabilities leads to elegance and refinement... and it just so happens, I've used the short ends of the hairs I've split to make up the differences in lenght on MANY occasions. :-) Now, if I could just learn to keep my documentation in sync with development... :-) L8r, Rob #!/usr/bin/perl -w use Disclaimer qw/:standard/; TIMTOWTDI From karic at lclark.edu Fri Jun 15 11:29:49 2001 From: karic at lclark.edu (Kari Chisholm) Date: Wed Aug 4 00:05:20 2004 Subject: Great Talent References: Message-ID: <3B2A37FD.E8A27A85@lclark.edu> PerlMongers: I'm not usually one for sending out unsolicited references - but I've got a young programmer here that would really be a find for someone. Aaron Kilbey is a recent graduate in computer science here at Lewis & Clark College. For the last two years, he's been working for me as a student employee - basically doing backend programming for interactive features on our site. Not only does Aaron really know his Perl, he's also been very creative about user interface, communications strategies, and database architecture. He's got good presentation skills to boot -- you'd be comfortable sending him in front of a client or customer. Lots of his work here at L&C is in the realm of password-protected sites for specific audiences - but I'd be happy to provide access to anyone who's interested. See his resume below. Feel free to email me with questions or for more info. Thanks! -kari. Kari Chisholm Creative Director for New Media Lewis & Clark College Portland, Oregon USA http://www.lclark.edu =========================================== Aaron Kilbey 471 Country Club Court Lake Oswego, OR 97034 503-860-1662 http://www.tropicalstormhawaii.com kilbey@lclark.edu WEB DEVELOPMENT/PROGRAMMING SKILLS ? 4+ years of Perl programming experience for CGI applications that provide HTML editor functionalities, website statistics analysis, and interactive information collection. ? 4+ years in Web and Graphic Design utilizing JAVA, JavaScript, and DHTML to enhance designs produced with Adobe Photoshop and Macromedia Flash. ? 4+ years of C programming experience for basic database principle implementation and graphics generation. ? Familiar with MPI, JAVA, Visual Basic, PostScript, Scheme. PLATFORM/NETWORKING SKILLS ? PC Hardware installation and troubleshooting including NIC's and Novell software, IBM AS/400 Client Access interfaces, and Lotus Notes software. ? Diverse knowledge and navigational ability in Windows 95/98/00/Me, Unix/Linux, Dos, and Macintosh operating systems. DEVELOPMENT/SUPPORT EXPERIENCE Web Developer: 1/99 - present Lewis & Clark College - Office of Publications & New Media ? Served as lead programmer for Trillium ? a web-based, web development application (built in PERL) for faculty and staff. Using Trillium, faculty and staff were able to develop web pages with zero prior technical knowledge, entirely in a point-and-click environment. ? Helped boost yield in admitted students by providing a personalized, customized website for students, including student profiles, visitation information, and interactive message boards. ? Built interactive events calendaring system for campus-wide use. Enabled entire campus to submit events to online calendar (with online approval/editing function for approved users). ? Developed interactive alumni notes message board system promoting correspondence and contributions. Web Developer: 1/98 - present Lewis & Clark College - Office of the Dean ? Developed 1999, 2000, and 2001 Summer Session websites providing course information and catalog request capabilities to increase summer enrollment. Support Associate: 5/99 ? 8/99 Castle Medical Center - Facility Services ? Created Access 97 database for all departmental records to track inventory and equipment. Support Associate: 6/98-9/98 Castle Medical Center - Information Systems ? Provided support with network and application troubleshooting. EDUCATION ? B.S. in Computer Science & Mathematics at Lewis & Clark College ? Portland, Oregon, 5/01. ? Honors Graduate from the Kamehameha Schools - Honolulu, Hawaii. TIMTOWTDI From rb-pdx-pm at redcat.com Mon Jun 18 07:30:43 2001 From: rb-pdx-pm at redcat.com (Tom Phoenix) Date: Wed Aug 4 00:05:20 2004 Subject: Great Talent In-Reply-To: <3B2A37FD.E8A27A85@lclark.edu> Message-ID: Don't we have a separate way (than this list) for folks to connect job seekers with potential employees? Since most subscribers to lists like this one aren't interested in employment-related messages, those messages are typically put on a different list (or on a website) so as not to discourage readership. If we don't already have a mailing list called something like pdx-pm-jobs for this purpose, I'd like to propose that it be created. (Or maybe two lists: pdx-pm-jobs-wanted and pdx-pm-jobs-announce.) Thoughts? -- Tom Phoenix Perl Training and Hacking Esperanto Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ TIMTOWTDI From masque at mindless.com Mon Jun 18 10:46:46 2001 From: masque at mindless.com (Masque) Date: Wed Aug 4 00:05:20 2004 Subject: Great Talent In-Reply-To: Message-ID: <20010618154645.QIOM17273.femail11.sdc1.sfba.home.com@masquentosh> We've discussed this before and we decided that job-related posts should have a '[JOB]' tag on them...but this isn't really announced to new members anywhere. Or current ones. Starting a new list is something we might be able to do, but with the recent administration jumbling at pm.org I'm worried it'll be more trouble than it's worth. I suppose I could set up a jobs area on the website, provided I have access again.... Your thoughts? Masque On Monday, June 18, 2001, at 05:30 AM, Tom Phoenix wrote: > Don't we have a separate way (than this list) for folks to connect job > seekers with potential employees? Since most subscribers to lists like > this one aren't interested in employment-related messages, those > messages > are typically put on a different list (or on a website) so as not to > discourage readership. > > If we don't already have a mailing list called something like > pdx-pm-jobs > for this purpose, I'd like to propose that it be created. (Or maybe two > lists: pdx-pm-jobs-wanted and pdx-pm-jobs-announce.) > > Thoughts? > > -- > Tom Phoenix Perl Training and Hacking Esperanto > Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ > > > TIMTOWTDI > TIMTOWTDI From protek_2000 at yahoo.com Mon Jun 18 11:44:22 2001 From: protek_2000 at yahoo.com (Michael Mitchell) Date: Wed Aug 4 00:05:20 2004 Subject: Great Talent In-Reply-To: <20010618154645.QIOM17273.femail11.sdc1.sfba.home.com@masquentosh> Message-ID: Job seekers have an interest in this, I know (being one in the software qa field), however... Do those who employ have an interest? Would this be a service or a distraction to them and others. If not, that [JOB] solution seems the less troublesome. On a list that I've managed over the years, we periodically send out an "announce" type message with our guidelines to keep new members informed and remind older members. You may want to consider this option. Michael Mitchell http://www.dgsoft.com/protek -----Original Message----- From: owner-pdx-pm-list@pm.org [mailto:owner-pdx-pm-list@pm.org]On Behalf Of Masque Sent: Monday, June 18, 2001 8:47 AM To: Tom Phoenix Cc: Portland Perl Mongers Subject: Re: Great Talent We've discussed this before and we decided that job-related posts should have a '[JOB]' tag on them...but this isn't really announced to new members anywhere. Or current ones. Starting a new list is something we might be able to do, but with the recent administration jumbling at pm.org I'm worried it'll be more trouble than it's worth. I suppose I could set up a jobs area on the website, provided I have access again.... Your thoughts? Masque On Monday, June 18, 2001, at 05:30 AM, Tom Phoenix wrote: > Don't we have a separate way (than this list) for folks to connect job > seekers with potential employees? Since most subscribers to lists like > this one aren't interested in employment-related messages, those > messages > are typically put on a different list (or on a website) so as not to > discourage readership. > > If we don't already have a mailing list called something like > pdx-pm-jobs > for this purpose, I'd like to propose that it be created. (Or maybe two > lists: pdx-pm-jobs-wanted and pdx-pm-jobs-announce.) > > Thoughts? > > -- > Tom Phoenix Perl Training and Hacking Esperanto > Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ > > > TIMTOWTDI > TIMTOWTDI _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com TIMTOWTDI From masque at pound.perl.org Mon Jun 18 13:17:49 2001 From: masque at pound.perl.org (Masque) Date: Wed Aug 4 00:05:20 2004 Subject: Great Talent In-Reply-To: ; from protek_2000@yahoo.com on Mon, Jun 18, 2001 at 09:44:22AM -0700 References: <20010618154645.QIOM17273.femail11.sdc1.sfba.home.com@masquentosh> Message-ID: <20010618131749.A21895@pound.perl.org> On Mon, Jun 18, 2001 at 09:44:22AM -0700, Michael Mitchell wrote: > Job seekers have an interest in this, I know (being one in the software > qa field), however... > > Do those who employ have an interest? Would this be a service or a > distraction to them and others. If not, that [JOB] solution seems the less > troublesome. > > On a list that I've managed over the years, we periodically send out > an "announce" type message with our guidelines to keep new members > informed and remind older members. You may want to consider this > option. > > Michael Mitchell > http://www.dgsoft.com/protek Yes, good idea. Let's formulate some of those guidelines. Masque. TIMTOWTDI From merlyn at stonehenge.com Mon Jun 18 14:26:44 2001 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Wed Aug 4 00:05:20 2004 Subject: Great Talent In-Reply-To: References: Message-ID: >>>>> "Michael" == Michael Mitchell writes: Michael> Job seekers have an interest in this, I know (being one in the software Michael> qa field), however... Michael> Do those who employ have an interest? Would this be a service or a Michael> distraction to them and others. If not, that [JOB] solution seems the less Michael> troublesome. Then there's already the list whose sole purpose is to post job listings and resume listings in the Perl arena. Use that list. It's not such a high volume that you can't weed out the ones that aren't in your area. perl-jobs-announce@perl.org, if I recall. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! TIMTOWTDI From sechrest at peak.org Thu Jun 21 18:26:39 2001 From: sechrest at peak.org (John Sechrest) Date: Wed Aug 4 00:05:21 2004 Subject: [job] This looks like an interesting job Message-ID: <200106212326.QAA24620@spock.peak.org> ------- Forwarded Message Date: Thu, 21 Jun 2001 11:58:25 -0700 Subject: Programming position in environmental research From: Jack Lewis To: linux-users@lugwash.org, uug@club.byu.edu, uug-officers@ruff.cs.jmu.edu, spug@halcyon.com, ma-jobs@tux.org, pfarrar@lynx.dac.neu.edu, gaede@fruug.org, callug-jobs@brain.cs.berkeley.edu, balug-announce@balug.org, balug@sifry.com, UUASC-jobs@UUASC.org, lug@lug.boulder.co.us, biznix@alcpress.com, npo@lists.PLUG.phoenix.az.us, pluglist@plug.org, info@peak.org The U.S. Forest Service, Pacific Southwest Research Station, has an opening for a position designing, coding, testing, and debugging applications for reduction, analysis, and graphical display of hydrologic research data. The incumbent writes and maintains instructions and documentation for programs; assists in the design and development of the research unit's web site; and provides public access to online data and publications. The position is located at the Redwood Sciences Laboratory (http://www.rsl.psw.fs.fed.us) beside the Arcata Community Forest on the Humboldt State University Campus in the town of Arcata in north-coastal California. Required experience: Unix, perl, S language Desired experience: C or Fortran, website design and development, HTML and Javascript Internal Job Number: PSW-Term-378-01 Job title: Computer Specialist GS-05/07/09 Employer: U.S. Forest Service, Pacific Southwest Research Station Starting salary: $30,287 to $43,230 depending on experience Application deadline: July 9, 2001. See complete vacancy announcement at http://www.usajobs.opm.gov/wfjic/jobs/IU8804.htm for application instructions and further information. If you have further questions about the job after reading the vacancy announcement, contact Jack Lewis at jl7001@humboldt.edu. Note: the vacancy announcement lists the job as GS-05/07. That should read GS-05/07/09. In other words you will be hired at the highest level (up to GS-09) for which you are qualified. ------- End of Forwarded Message TIMTOWTDI From ckuskie at dalsemi.com Thu Jun 21 18:55:56 2001 From: ckuskie at dalsemi.com (Colin Kuskie) Date: Wed Aug 4 00:05:21 2004 Subject: mod_perl, CGI and stacked content handlers Message-ID: <20010621165556.A15940@dalsemi.com> Hey, Mongers! I've been using a hacked up version of Lincoln Steins original Apache::NavBar module for wrapping a header, footer and navigation around HTML pages from my server. Now I'd like to add some CGI scripts (search engine, etc.) and have found several hiccups: ---------------------------------------------------------------- 1) $r->content_type() and CGI. With a simple test CGI script: #!/usr/local/bin/perl use strict; use CGI qw/:standard/; print header(); print start_html(); print "hello world\n"; print end_html; The beginning of the handler(warn statement for debugging) says that the content type of the request is empty (not sure whether undefined or null) sub handler { my $r = shift; warn "CT: ", $r->content_type, "\n"; $r->content_type eq 'text/html' || return DECLINED; Is that because the content type for the request object is set by the file type and since there's no physical file associated with CGI output it's unknown? I hesitate just to assign a default type since some future CGI's will be outputting graphics. I'd hoped that Apache would look at the header and determine the content_type from there. ---------------------------------------------------------------- 2) Apache::OutputChain and per-request configurations Apache::NavBar is great; I can set per directory or per file configurations for headers, footers and navigation. However, when I used Apache::OutputChain to cause the output of the CGI to be filtered by it, the object that gets passed to the PRINT method is not the Apache object, but a pseudo-object from the Apache::NavBar class. (Note, I left the code at home otherwise I'd post the code and setup below this. If people are interested in taking a peek I'll remember to bring it in tomorrow) This means that after I bypassed the content checking that I was still unable to wrap the CGI output because the code had nowhere to look (in other words, $r->dir_config('MyVar') couldn't be resolved by Apache::NavBar). Have any of you come across and already dealt with something like this? Is there an easier way to get a solution to my overall problem? Do I need to go out and buy a book (other than the Writing Apache Modules in Perl and C book that I bought yesterday)? Should I wait until mod_perl supports the Filter API in Apache 2.0? Thenks, Colin Kuskie TIMTOWTDI From markmoon at teleport.com Tue Jun 26 15:47:31 2001 From: markmoon at teleport.com (MarkyMoon) Date: Wed Aug 4 00:05:21 2004 Subject: Test Message-ID: <3B38F4E2.1821D343@teleport.com> I hate Earthlink/Onemain! -- @a = ("a".."z"," ",",","\n","!");foreach $b ( 28,0,26,14,13,4,26,11,26,17,0,13,3,0,11,26,22,17,14,19,4,26,19,7,4,26,1,14,14,10,27,28, 0,26,19,22,14,26,11,26,11,11,0,12,0,26,5,14,17,26,19,7,4,26,11,14,14,10,27,28, 1,20,19,26,19,14,26,22,7,14,12,26,22,4,26,14,22,4,26,8,19,26,0,11,11,27,28, 8,18,26,19,7,4,26,19,7,17,4,4,26,11,26,11,0,17,17,24,26,22,0,11,11,29,28,28, 17,0,13,3,0,11,28) {print "$a[$b]"};print $a[28]; TIMTOWTDI From rb-pdx-pm at redcat.com Tue Jun 26 16:35:10 2001 From: rb-pdx-pm at redcat.com (Tom Phoenix) Date: Wed Aug 4 00:05:21 2004 Subject: Test In-Reply-To: <3B38F4E2.1821D343@teleport.com> Message-ID: On Tue, 26 Jun 2001, MarkyMoon wrote: > Subject: Test Test failed. It went out to the entire list. :-( If you want to know whether you can send and receive mail, you can write to Fred and Barney's autoresponder, which also serves to show skeptics that email addresses are more interesting than commonly thought. Here's their address: You can generally replace the ampersand with your favorite punctuation mark, including even a backslashed double-quote, if you wish. If you need to test something else, though, posting to a normal mailing list may not be the best way to do that. I think there are some testing mailing lists around, for people who want them. > I hate Earthlink/Onemain! Me, too. > @a = ("a".."z"," ",",","\n","!");foreach $b ( > 28,0,26,14,13,4,26,11,26,17,0,13,3,0,11,26,22,17,14,19,4,26,19,7,4,26,1,14,14,10,27,28, > 0,26,19,22,14,26,11,26,11,11,0,12,0,26,5,14,17,26,19,7,4,26,11,14,14,10,27,28, > 1,20,19,26,19,14,26,22,7,14,12,26,22,4,26,14,22,4,26,8,19,26,0,11,11,27,28, > 8,18,26,19,7,4,26,19,7,17,4,4,26,11,26,11,0,17,17,24,26,22,0,11,11,29,28,28, > 17,0,13,3,0,11,28) {print "$a[$b]"};print $a[28]; I regret that the upcoming Third Edition of the Llama won't include this charming poem, but it wouldn't really have been fitting. But with regard to your code, you could simplify it somewhat, if you wanted, with use of $_, qw//, and maybe a trick or two. But you should really get rid of the quote marks in the last line, since they don't do anything but mislead. Cheers! -- Tom Phoenix Perl Training and Hacking Esperanto Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/ TIMTOWTDI