From farinella at mcttelecom.com Fri May 2 08:41:38 2003 From: farinella at mcttelecom.com (Charles Farinella) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] YAPC::Canada - Ottawa - May 14, 15 and 16 (fwd) Message-ID: ---------- Forwarded message ---------- To: yapc@yapc.ca From: Clayton L. Scott Subject: YAPC::Canada - Ottawa - May 14, 15 and 16 This mailing is targeted to PM groups in the North Eastern United States within a 10 hour drive of Ottawa. If I have mis-calculated the distance I apologise in advance. Could you please foward this announcement to your PM group list? I'm writing to remind you about YAPC::Canada coming up in May 14, 15 and 16. Please consider this a belated invitation to YAPC::Canada. Due to the lateness of this invitation I understand if you can't make it this year but please start preparing to attend next year as we'll be in the same location. Talk and Registration info is below. Thank you, Clayton Scott, YAPC::Canada DETAILS: YAPC::Canada (Yet Another Perl Conference) is a low-cost 1 1/2 day conference run by volunteers with its roots in the Perl Mongers groups. YAPC::Canada features two speaker streams and an optional day of pre-conference training. All the conference details are online. You can register yourself at anytime on the site http://www.yapc.ca/ help@yapc.ca DATES Training - May 14 (optional) Tutorials - May 15 - 9am - 12noon Conference Keynote - May 15 - 1pm Presentations - May 15 - 2pm - 5:30pm May 16 - 9am - 5:30pm KEYNOTE PRESENTER Dick Hardt - Founder and CTO of ActiveState. ABOUT THE CONFERENCE Cost - $75 / $45 for students (see site for payment details) Meals - Dinner on Thursday and lunch BBQ on Friday Size - We have space for 100 people Location - Carleton University, Ottawa, Ontario Proceedings - supplied on CD (ISBN 0-9733033-0-1) Help and info - email help@yapc.ca TRAINING Peter Scott - a professional trainer and author of Perl Debugged - will be delivering a 1 day hands on training course Wednesday May 14 at a cost of $250. Object Oriented Perl visit http://www.psdt.com/services/oo_perl.html for course details and registration info. FREE TUTORIALS Attendees to these tutorials do not need to be registered in the conference. Perhaps your coworkers or friends would benefit from them? Pass the word along! YAPT - Yet Another Perl Tutorial given by Mick Villeneuve An introduction to Perl for those who have never programmed in Perl before. Introduction to Regular Expressions given by Steve Jenkins Skills development for those who have programmed a little bit in Perl. Both tutorials run from 9am - 12 noon on Thursday May 15. PRESENTATIONS Beginner / Intermediate stream Thursday Afternoon - Using the Perl Debugger for Fun and Profit - Ten Easy Mistakes with XML and Perl - Tips for Learning XSLT Friday - Variations on a Theme: "Repeated Code Is a Mistake" - Object Oriented Perl - 20 minutes, 40 programs, 80 lines of code - Date and Times in Perl - Automatic Generation of Time-lapse Animations - Making labels using Perl and PDF Intermediate / Advanced stream Thursday Afternoon - Using Inline - Learning and Using DocBook - Using Log4perl Friday - Perl Style Guides for Large Projects - Design and Implementation of an efficient event loop in pure Perl - OpenThought and OpenPlugin - Exploring Perl Shells - Using Safe - Perl->pig(lipstick) - Perl 5.8 upgrade notes You may attend talks in either stream during the conference. From cfarinella at appropriatesolutions.com Fri May 2 10:28:46 2003 From: cfarinella at appropriatesolutions.com (Charlie Farinella) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] [Fwd: randal schwartz perl classes in boston] Message-ID: <1051889327.23361.16.camel@lpc01.corp.appropriatesolutions.com> -----Forwarded Message----- > From: Uri Guttman > Subject: randal schwartz perl classes in boston > Date: 01 May 2003 18:08:38 -0400 > > > to all boston perl class attendees: > > i am working on bringing randal schwartz to boston to teach a week of > perl classes. the probable dates are the first week in june 2-6. this > letter is being sent to gauge the interest in these classes. if the > demand is there i will proceed and make an official announcement and web > page. so please email me back with your interest level, which classes > you would take and how many people, etc. > > the tuition will be the same as with damian's classes. $499 per class > day with $100 off each day for 3 or more days. > > 1 day $499 > 2 days $998 > 3 days $1399 > 4 days $1799 > 5 days $2199 > > we will offer the usual 1/2 price to students and the underemployed > > these are the classes i picked out and i think they are the most useful > set for many perl hackers. this list is my suggestion and it is not > final and if you want different ones, please request them. > > 2 day PROM (Packages, References, Objects, Modules) > this is the basis for his new 'alpaca' book coming out > in a few weeks > 1 day Learning mod_perl > 1 day Advanced mod_perl > 1 day CGI and DBI (half day of each) > > you can read more about these and other possible classes at > > http://www.stonehenge.com/perltraining/courses.html > > note that we can't offer any 'lab' type classes and the class length (on > his web page) is shorter without the labs. > > i won't bore you with a bio (stonehenge.com site has it) of randal as > you should all know who he is. in my experience he is as good a > teacher as damian but with different styles. and the above classes are > not overlapping with what damian has teaches so they are a good > complement to any classes you have taken before. > > please foward this onto any colleagues, coworkers and friends who might > be interested. > > thanx, > > uri > > -- > Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com > --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- > Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org > > -- ------------------------------------------------------------------------ Charlie Farinella, Appropriate Solutions, Inc. cfarinella@AppropriateSolutions.com 603-924-6079 From fblack at docucorp.com Wed May 7 10:29:41 2003 From: fblack at docucorp.com (Black, Franklin) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] strange syntax error Message-ID: <60F043336182D3118E930050041891973D74E9@BED1CN02> This code works #!/l:\util\perl\bin\perl use Getfunclines; use Getofflength; my @array; my $file=$ARGV[0]; my $prec; Getofflength:GetArrays($file); my @array= @{$prec}; print @array; This code says I have a syntax error at line 7 near Getofflength: #!/l:\util\perl\bin\perl use Getfunclines; use Getofflength; my @array; my $file=$ARGV[0]; my $prec; $prec = Getofflength:GetArrays($file); my @array= @{$prec}; print @array; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/nh-pm/attachments/20030507/732f8f47/attachment.htm From morbus at disobey.com Wed May 7 10:36:38 2003 From: morbus at disobey.com (Morbus Iff) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] strange syntax error In-Reply-To: <60F043336182D3118E930050041891973D74E9@BED1CN02> Message-ID: <5.2.1.0.2.20030507113601.00c44a50@red.totalnetnh.net> >#!/l:\util\perl\bin\perl > use Getfunclines; > use Getofflength; > my @array; > my $file=$ARGV[0]; > my $prec; > $prec = Getofflength:GetArrays($file); Should that : be double ::'s? -- Morbus Iff ( i'm the droid you're looking for ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Buy My Book! http://amazon.com/exec/obidos/ASIN/0596004605/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus From pll at lanminds.com Wed May 7 10:35:15 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] strange syntax error In-Reply-To: Message from "Black, Franklin" of "Wed, 07 May 2003 10:29:41 CDT." <60F043336182D3118E930050041891973D74E9@BED1CN02> References: <60F043336182D3118E930050041891973D74E9@BED1CN02> Message-ID: <20030507153515.CE9EFF704@tater> In a message dated: Wed, 07 May 2003 10:29:41 CDT "Black, Franklin" said: >This code works > Getofflength:GetArrays($file); > >This code says I have a syntax error at line 7 near Getofflength: > > $prec = Getofflength:GetArrays($file); I'm not familiar with perl on Windows, however, Perl on UNIX/Linux requires a '::' in module names. You seem to only have a single ':' above. Could that be your problem? -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From fblack at docucorp.com Wed May 7 14:04:16 2003 From: fblack at docucorp.com (Black, Franklin) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] strange syntax error Message-ID: <60F043336182D3118E930050041891973D74ED@BED1CN02> Yes the :: was the problem. Thansk to all. -----Original Message----- From: Paul L Lussier [mailto:pll@lanminds.com] Sent: Wednesday, May 07, 2003 10:35 AM To: Black, Franklin Cc: 'nh-pm@mail.pm.org' Subject: Re: [Nh-pm] strange syntax error In a message dated: Wed, 07 May 2003 10:29:41 CDT "Black, Franklin" said: >This code works > Getofflength:GetArrays($file); > >This code says I have a syntax error at line 7 near Getofflength: > > $prec = Getofflength:GetArrays($file); I'm not familiar with perl on Windows, however, Perl on UNIX/Linux requires a '::' in module names. You seem to only have a single ':' above. Could that be your problem? -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From numberwhun at attbi.com Wed May 14 10:19:18 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJPM06021@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:20 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJRM06031@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:19 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJQM06029@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:19 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJQM06024@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:20 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJQM06025@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:20 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJRM06034@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:20 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJSM06042@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:21 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJRM06039@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:23 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJYM06051@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From numberwhun at attbi.com Wed May 14 10:19:19 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... Message-ID: <200305141519.h4EFJSM06040@mail.pm.org> Ok, I have a question that I do not remember if it has been discussed or not. Does NH-pm hold any meetings? If so, where are the meetings normally held and when? I ask as I have not seen nor heard any mention of it. If not, are there any plans or discussions of possibly starting to meet? Personally it would be great to get together and hack out some code once a month or so. Regards, Jeff Kirkland From rgacote at AppropriateSolutions.com Wed May 14 11:47:19 2003 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way Message-ID: Hi Folks: The following piece of code works perfectly fine, but I'm thinking there's probably a more Perlish solution to the problem. As you can see from the code fragment, the runQuery routine is executing an SQL statement and all the results are returned in an array of arrays. In order to print these nicely, I then convert any Oracle null values into the string 'NULL'. My solution was to iterate (using a map) through each array and then iterate (using map) through each element of that array. Is there a simpler way to do this? One that would iterate through all the elements in one pass? Thanks --Ray (perl 'prentice at play) # check and 'NULL' a single element. # this is the inner map sub fixupNULL { my ($s) = @_; $s = 'NULL' if !defined($s); return $s } # grab a row at a time out of the array. # this is the outer map sub fixupNULLrow { my ($aref) = @_; @$aref = map fixupNULL($_), @$aref; return $aref; } # run query and output result with Oracle nulls converted to string 'NULL'. sub runQuery { my ($sql) = @_; my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die; my $rowref; @$aref = map fixupNULLrow($_), @$aref; foreach $rowref (@$aref) { print join( "\t", @$rowref) . "\n"; } } -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From pll at lanminds.com Wed May 14 12:02:37 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... In-Reply-To: Message from numberwhun@attbi.com of "Wed, 14 May 2003 15:19:23 -0000." <200305141519.h4EFJYM06051@mail.pm.org> References: <200305141519.h4EFJYM06051@mail.pm.org> Message-ID: <20030514170237.0B54BF78E@tater> Not sure why I received this e-mail 9 times, but I'm only answering it once :) >>>>> On Wed, 14 May 2003, "Jeff" == numberwhun@attbi.com wrote: Jeff> Does NH-pm hold any meetings? Currently, no. Jeff> are there any plans or discussions of possibly starting to Jeff> meet? Well, you'd have to ask Charlie Farinella who created this mail list. I do know that Charlie has had quite a hectic life lately, which probably got in the way of planning or attending meetings of any kind. Though he did mention to me recently that things may be quieting down enough for him to start thinking about it. I'll let him answer more definitively than that :) -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From pll at lanminds.com Wed May 14 12:27:07 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: Message from Ray Cote of "Wed, 14 May 2003 12:47:19 EDT." References: Message-ID: <20030514172708.EE6FDF78E@tater> In a message dated: Wed, 14 May 2003 12:47:19 EDT Ray Cote said: ># run query and output result with Oracle nulls converted to string 'NULL'. >sub runQuery { > my ($sql) = @_; > my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die; > my $rowref; > > @$aref = map fixupNULLrow($_), @$aref; > > foreach $rowref (@$aref) > { > print join( "\t", @$rowref) . "\n"; > } >} How about: # run query and output result with Oracle nulls converted to string 'NULL'. sub runQuery { my ($sql) = @_; my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die; my $rowref; foreach $rowref (@$aref) { map { $_ = 'NULL' if !defined($_) } @$rowref; print join( "\t", @$rowref) . "\n"; } } All I'm doing here is eliminating the extra traversing of each array here. Since you're already traversing each array in order to print out the rows, there's no need to traverse each array to separately change the value of components of that array. Effectively what I'm doing is collapsing those 2 extra subs into a single line, and placing it inside a look which already does the same thing. You could also do something like: # run query and output result with Oracle nulls converted to string 'NULL'. sub runQuery { my ($sql) = @_; my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die; my $rowref; foreach $rowref (@$aref) { map { $_ = 'NULL' if !defined($_); # change undef'ed elements to NULL print "$_\t"; # print each element as we see them # following it with a tab } @$rowref; print "\n"; # terminate with a newline } } The down side of this method is that you end up with an extra \t immediately prior to the \n which you don't get with join(). Hmmmm, how about: # run query and output result with Oracle nulls converted to string 'NULL'. sub runQuery { my ($sql) = @_; my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die; my $rowref; foreach $rowref (@$aref) { map { $_ = 'NULL' if !defined($_); # change undef'ed elements to NULL $string .= "$_\t"; # add the element to $string # followed by a tab } @$rowref; chop $string; # remove trailing tab print "$string\n" # print with terminating newline } } This should be pretty close to the original. You could change that 'chop()' call to something like: $string =~ s/\t$//; if you want to explicitly only remove the trailing tab, rather than run the risk of accidently removing the last character, which is what chop() does. HTH, -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From rgacote at AppropriateSolutions.com Wed May 14 13:09:57 2003 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: <20030514172708.EE6FDF78E@tater> References: <20030514172708.EE6FDF78E@tater> Message-ID: At 1:27 PM -0400 5/14/03, Paul L Lussier wrote: >How about: > # run query and output result with Oracle nulls converted to string 'NULL'. > sub runQuery { > my ($sql) = @_; > my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die; > my $rowref; > > foreach $rowref (@$aref) > { > map { $_ = 'NULL' if !defined($_) } @$rowref; > print join( "\t", @$rowref) . "\n"; > } > } Hi Paul. My preference is for this first one. Seems the most readable for me. Thanks for the quick feedback. (so much to learn...) --Ray -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From pll at lanminds.com Wed May 14 13:19:57 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: Message from Ray Cote of "Wed, 14 May 2003 14:09:57 EDT." References: <20030514172708.EE6FDF78E@tater> Message-ID: <20030514181958.F2BF1F7B1@tater> In a message dated: Wed, 14 May 2003 14:09:57 EDT Ray Cote said: >Hi Paul. >My preference is for this first one. >Seems the most readable for me. >Thanks for the quick feedback. >(so much to learn...) Interesting. I would've have opted for the third one. I don't see a lot of difference in readability between the three, so I would have gone after the efficiency of the the third (which incidently, has a minor bug in it, can you spot it :) But hey, whatever skins your cat :) There was nothing wrong with what you had to begin with, it was just slightly inefficient to loop through the each array twice. -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From rgacote at AppropriateSolutions.com Wed May 14 13:48:55 2003 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: <20030514181958.F2BF1F7B1@tater> References: <20030514172708.EE6FDF78E@tater> <20030514181958.F2BF1F7B1@tater> Message-ID: At 2:19 PM -0400 5/14/03, Paul L Lussier wrote: >Interesting. I would've have opted for the third one. At my stage of Perl development, it takes too long to wrap my mind around the anonymous code block inside the map. That }@$rowref; line simply looks wrong to my poor little C++/Pascal-addled brain. :} > ... so I would have gone after the efficiency of the the third To expand my Perl knowledge a little bit more, do you feel the third example is more efficient because it does not have the overhead of building a second array? However, what is the efficiency of always appending to the $string on each pass vs doing a join (though, for all I know, join may simply iterate and append as well). > (which incidently, has a >minor bug in it, can you spot it :) You didn't declare my $string? >But hey, whatever skins your cat :) Well TMTOWTDI indeed! --Ray -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From cfarinella at appropriatesolutions.com Wed May 14 13:58:38 2003 From: cfarinella at appropriatesolutions.com (Charlie Farinella) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... In-Reply-To: <200305141519.h4EFJRM06031@mail.pm.org> References: <200305141519.h4EFJRM06031@mail.pm.org> Message-ID: <1052938719.14700.62.camel@lpc01.corp.appropriatesolutions.com> On Wed, 2003-05-14 at 11:19, numberwhun@attbi.com wrote: > If not, are there any plans or discussions of possibly starting to meet? > Personally it would be great to get together and hack out some code once a month > or so. There are now, aren't there. :-) How about we meet informally for dinner at Pizzeria Uno on S. Willow St. in Manchester, Tuesday May 27 at 7:00PM to discuss it. Anyone who has an interest is welcome, we can discuss what we might like to do and how best to go about it. --charlie -- ------------------------------------------------------------------------ Charlie Farinella, Appropriate Solutions, Inc. cfarinella@AppropriateSolutions.com 603-924-6079 From pll at lanminds.com Wed May 14 14:16:39 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: Message from Ray Cote of "Wed, 14 May 2003 14:48:55 EDT." References: <20030514172708.EE6FDF78E@tater> <20030514181958.F2BF1F7B1@tater> Message-ID: <20030514191639.7CC99F81B@tater> In a message dated: Wed, 14 May 2003 14:48:55 EDT Ray Cote said: >> ... so I would have gone after the efficiency of the the third >To expand my Perl knowledge a little bit more, do you feel the third >example is more efficient because it does not have the overhead of >building a second array? In short yes. The third is nothing more than a refinement of the second. Technically, the second probably uses slightly less memory, since it just spits out each element as it appears. However, not wanting a stray \t at the end of every line (which could introduce line-wrapping issues) I'd rather incur the overhead of storing everything in $string, then printing each complete row out all at once, rather than in pieces. >However, what is the efficiency of always appending to the $string on >each pass vs doing a join (though, for all I know, join may simply >iterate and append as well). I have no idea what the difference between .= and a join are as far as efficiency. The .= though, allows you to operate on each element before printing it, whereas a join does not. Really, I think it's a wash in this case. Any of the 3 methods is slightly more efficient than the pre-processing you started out with. I don't by how much, since it completely depends upon your dataset. But having to process each row twice, basically adds an exponential amount of time your processing, right? >> (which incidently, has a >>minor bug in it, can you spot it :) >You didn't declare my $string? Well, declaration is irrellevent in perl in most cases. More specifically, I do not clear the contents of $string after each pass of the loop. So, since I use the .= operator, I end up appending each row to the next for the duration of the loop. This problem can be solved in 2 ways. Either, create $string as a my()'ed variable local to the foreach, so that it remains in scope for the map, but gets re-defined for each new row, or just clear the variable at the beginning of each pass of the foreach loop. In either case, the statement would just before the map() call. Clearing the variable probably is the most efficient, since you only allocate that memory once, where as my()'ing the variable probably allocates a new chunk of memory through each pass. The difference in performance is probably negligible, but, it's good to be aware of the implications of different methods :) -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From rgacote at AppropriateSolutions.com Wed May 14 14:25:55 2003 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: <20030514191639.7CC99F81B@tater> References: <20030514172708.EE6FDF78E@tater> <20030514181958.F2BF1F7B1@tater> <20030514191639.7CC99F81B@tater> Message-ID: Thanks Paul for all the comments. I think we can call this lesson closed for the moment. --Ray -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From pll at lanminds.com Wed May 14 14:28:12 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: Message from Ray Cote of "Wed, 14 May 2003 14:48:55 EDT." References: <20030514172708.EE6FDF78E@tater> <20030514181958.F2BF1F7B1@tater> Message-ID: <20030514192812.D20C2F81B@tater> In a message dated: Wed, 14 May 2003 14:48:55 EDT Ray Cote said: >At my stage of Perl development, it takes too long to wrap my mind >around the anonymous code block inside the map. That }@$rowref; line >simply looks wrong to my poor little C++/Pascal-addled brain. :} Oops, forgot to address this :) What's the difference between: map { $_ = 'NULL' if !defined($_) } @$rowref; print join( "\t", @$rowref) . "\n"; and map { $_ = 'NULL' if !defined($_); print "$_\t"; } @$rowref; print "\n"; Syntactlically, they're basically the same. In the second though, I'm moving the print inside the map. think of the map() as nothing more than a 'foreach'. These two snippets are functionally equivalent: foreach (@$rowref) { | map { $_ = 'NULL' if !defined($_); | $_ = 'NULL' if !defined($_); print "$_\t"; | print "$_\t"; } | } @$rowref; print "\n"; | print "\n"; All I did was take: map { $_ = 'NULL' if !defined($_) } @$rowref; and add one statement, which created this: map { $_ = 'NULL' if !defined($_); print "$_\t"; } @$rowref; Then, I just added a couple new lines to get: map { $_ = 'NULL' if !defined($_); print "$_\t"; } @$rowref; print "\n"; to make it more readable. However, YOU created: map { $_ = 'NULL' if !defined($_) } @$rowref; to begin with, all I did was add a print statement :) So, a print statement should be too tough to wrap your "C++/Pascal addled brain around" ;) -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From rgacote at AppropriateSolutions.com Wed May 14 14:42:52 2003 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] The Perly Way In-Reply-To: <20030514192812.D20C2F81B@tater> References: <20030514172708.EE6FDF78E@tater> <20030514181958.F2BF1F7B1@tater> <20030514192812.D20C2F81B@tater> Message-ID: At 3:28 PM -0400 5/14/03, Paul L Lussier wrote: >So, a print statement should be too tough to wrap your >"C++/Pascal addled brain around" ;) Oh Lord, I guess so! :} -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From fblack at docucorp.com Thu May 22 15:19:25 2003 From: fblack at docucorp.com (Black, Franklin) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] word doc Message-ID: <60F043336182D3118E930050041891973D7526@BED1CN02> Does anyone know how to read a word document? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/nh-pm/attachments/20030522/156b00ad/attachment.htm From bscott at ntisys.com Thu May 22 15:40:17 2003 From: bscott at ntisys.com (bscott@ntisys.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] word doc In-Reply-To: <60F043336182D3118E930050041891973D7526@BED1CN02> Message-ID: On Thu, 22 May 2003, at 3:19pm, fblack@docucorp.com wrote: > Does anyone know how to read a word document? MS-Word would be the usual choice. There are "free" MS-Word Viewers on Microsoft's website as well. You can run 'em native on Windows or MacOS or some other commercial Unixes, or emulated under Wine or CodeWeavers or Win4Lin or VMware or whatever. StarOffice/OpenOffice and many other non-Microsoft word processors can usually import MS-Word .DOC files with a good degree of success. If all you want is the text, "strings" often works well enough. There is a more sophisticated "wvWare" suite (Free) that can do more. You might be a bit more specific. What are you trying to do, what OS are you using, that sort of thing. What does this have to do with Perl? :) -- Ben Scott | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | From kclark at CetaceanNetworks.com Thu May 22 15:50:12 2003 From: kclark at CetaceanNetworks.com (Kevin D. Clark) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] word doc In-Reply-To: <60F043336182D3118E930050041891973D7526@BED1CN02> References: <60F043336182D3118E930050041891973D7526@BED1CN02> Message-ID: <1afzn6wvsr.fsf@koan.cetaceannetworks.com> "Black, Franklin" writes: > Does anyone know how to read a word document? Perhaps the OLE::Storage module is what you want? This has some facilites for converting such documents to plain text as well. Regards, --kevin (who was once asked in a job interview "can you read?") -- Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA) cetaceannetworks.com!kclark (GnuPG ID: B280F24E) alumni.unh.edu!kdc From numberwhun at attbi.com Mon May 26 21:26:45 2003 From: numberwhun at attbi.com (Jefferson Kirkland) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Question..... References: <200305141519.h4EFJRM06031@mail.pm.org> <1052938719.14700.62.camel@lpc01.corp.appropriatesolutions.com> Message-ID: <3ED2CCE5.7030003@attbi.com> Allow me to just say, that it really stinks when you ask a question, a meeting is called to discuss the question, and he who brought it up doesn't even show. Basically this is me saying that I am not going to be making it to the initial meeting of NH-Pm. Unfortunately, because of the Memorial Day holiday, my Monday night class at college was rescheduled to Tuesday night. I will definately try and be at the next one. Regards, Jeff Kirkland Charlie Farinella wrote: >On Wed, 2003-05-14 at 11:19, numberwhun@attbi.com wrote: > > > >>If not, are there any plans or discussions of possibly starting to meet? >>Personally it would be great to get together and hack out some code once a month >>or so. >> >> > >There are now, aren't there. :-) > >How about we meet informally for dinner at Pizzeria Uno on S. Willow St. >in Manchester, >Tuesday May 27 at 7:00PM to discuss it. Anyone who has an interest is >welcome, we can discuss what we might like to do and how best to go >about it. > >--charlie > > > From cfarinella at appropriatesolutions.com Tue May 27 12:21:03 2003 From: cfarinella at appropriatesolutions.com (Charlie Farinella) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Meeting reminder Message-ID: <1054056063.20127.4.camel@lpc01.corp.appropriatesolutions.com> Just a reminder, we will be having our first meeting tonight at 7:00PM which will be aimed at mapping a course of action for the group at Pizzeria Uno on S. Willow St. in Manchester: I haven't been there, but have spoken with them and they will have small room available to us. Hope to see you there. --charlie -- ------------------------------------------------------------------------ Charlie Farinella, Appropriate Solutions, Inc. cfarinella@AppropriateSolutions.com 603-924-6079 From numberwhun at attbi.com Tue May 27 12:50:56 2003 From: numberwhun at attbi.com (numberwhun@attbi.com) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Meeting reminder Message-ID: <200305271751.h4RHp7632059@mail.pm.org> If possible, for those of us that are not going to be able to make it, could someone send out an email with a recap of the meeting? Thanks! Jeff Kirkland > Just a reminder, we will be having our first meeting tonight at 7:00PM > which will be aimed at mapping a course of action for the group at > Pizzeria Uno on S. Willow St. in Manchester: > > > > I haven't been there, but have spoken with them and they will have small > room available to us. > > Hope to see you there. > > --charlie > > -- > ------------------------------------------------------------------------ > Charlie Farinella, Appropriate Solutions, Inc. > cfarinella@AppropriateSolutions.com > 603-924-6079 > > > _______________________________________________ > Nh-pm mailing list > Nh-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/nh-pm From ben at blackavar.com Sat May 31 10:45:00 2003 From: ben at blackavar.com (Ben Boulanger) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] findinrpm Message-ID: <1054395900.31172.3.camel@bensbox.blackavar.com> Thought some people might find this useful beyond just me... Finds which RPM a file belongs to - anyone know of a better way to do this? Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: findinrpm Type: text/x-perl Size: 611 bytes Desc: not available Url : http://mail.pm.org/pipermail/nh-pm/attachments/20030531/d3e3374a/findinrpm.bin