From farinella at mcttelecom.com Thu Aug 1 06:10:37 2002 From: farinella at mcttelecom.com (Charlie Farinella) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Status Message-ID: <1028200238.21694.16.camel@farinella.mcttelecom.com> While we're still waiting for the Perl Mongers nameserver to update itself, I can tell you that eventually there should be a website at: http://nh.pm.org The mailing list is up, we have currently 20 subscribers. We need to talk about meetings, both in terms of location (they could be in one central location, or rotate around the southern part of the state), and time. If we can agree on a location to have an initial organizational type meeting, I will find a place, and we'll go from there. My initial preference would be somewhere in Manchester, as I think that it's accessible in less than an hour from most everywhere, but if Nashua, or somewhere else is better for the majority of folks, that's fine. Let us know what you think. --charlie -- Charlie Farinella farinella@mcttelecom.com From paulc at visual.mv.com Thu Aug 1 17:34:35 2002 From: paulc at visual.mv.com (Paul Courchene) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) Message-ID: <001701c239ab$9df70e40$8d637dc7@campus.rivier.edu> Potential choices for Meeting ... I wish to register my (one) vote for a Meeting Place in Nashua. Rivier College has a number of facilities for such a meeting. I currently teach there part time, so will make inquiries for a Meeting Room and look at the "Open Schedule" ... There is a course on "Perl Programming" taught (last Semester) at Rivier College and I would like to nurture that effort a little more, if possible. There are lots of students with an interest in Perl at Rivier College, so we could contribute in a number of ways by holding a Meeting(s) there in the future if things work out O. K. (that's one option ...) Dr. Richard Greene teaches a number of courses there and put the Perl effort together. I would approach him, eventually, to be a Guest Speaker ... He works at MT Lincoln Labs, and has used Perl in a number of interesting ways Southern NH University in Manchester has a wonderful Auditorium, not too large, where the Manchester Java User's Group (www.ManJug.com) meets, on a Monthly basis. The Chairperson of the Computer Information's Systems Department is very receptive to assisting Users Groups schedule events there. So, that is a wonderful setting for a potential meeting also (Option 2). Daniel Webster College in Nashua has been very receptive to scheduling User's Groups as you may know (Option 3). paulc From bscott at ntisys.com Thu Aug 1 20:15:47 2002 From: bscott at ntisys.com (bscott@ntisys.com) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) In-Reply-To: <001701c239ab$9df70e40$8d637dc7@campus.rivier.edu> Message-ID: On Thu, 1 Aug 2002, at 6:34pm, Paul Courchene wrote: > I wish to register my (one) vote for a Meeting Place in Nashua. I'm actually in favor of Manchester, even though it is a longer drive for me. GNHLUG already does a lot of stuff in Nashua, and I think it would be nice to have a more "central" location. But, I, too, have only one vote, so I think we should wait for more responses, too. :-) -- Ben Scott | Net Technologies, Inc. | 978-462-8795 Network Engineer | Salisbury, MA, USA | 866-NTI-LINUX (684-5468) bscott@ntilinux.com | http://www.ntilinux.com | Fax: 978-499-7839 From erikprice at mac.com Thu Aug 1 22:14:16 2002 From: erikprice at mac.com (Erik Price) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) In-Reply-To: <001701c239ab$9df70e40$8d637dc7@campus.rivier.edu> Message-ID: On Thursday, August 1, 2002, at 06:34 PM, Paul Courchene wrote: > I wish to register my (one) vote for a Meeting Place in Nashua. I'm in favor of Nashua too, since I live in Dunstable. But I can make it to Manch Vegas if that's where it's going to be. (My vote shouldn't count for much anyway because there is a possibility that I may be scheduled to work :( ). Erik --- Erik Price email: erikprice@mac.com jabber: erikprice@jabber.org From numberwhun at attbi.com Thu Aug 1 22:05:18 2002 From: numberwhun at attbi.com (Jefferson Kirkland) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) In-Reply-To: <001701c239ab$9df70e40$8d637dc7@campus.rivier.edu> Message-ID: <5.1.0.14.0.20020801230150.00b88ec8@mail.attbi.com> I am putting my vote in for Nashua as well. I am a member of the MELBA arm of GNHLUG and lately we have been having our meetings at Daniel Webster College. There is a gentleman in the Continuing Education office there that pretty much helped arrange our ability to have meetings there. Maybe they would be kind enough to let us have this meeting there as well. Before that, the group would meet at a restaurant called Martha's Exchange on Main Street. They have quite the meeting hall above the restaurant, where we would all meet after stuffing ourselves with food and micro-brewed beer. ( or soda as the case may be. ). Just my .02. Regards, Jeff Kirkland At 06:34 PM 8/1/2002 -0400, Paul Courchene wrote: >Potential choices for Meeting ... > >I wish to register my (one) vote for a Meeting Place in Nashua. >Rivier College has a number of facilities for such a meeting. >I currently teach there part time, so will make inquiries for >a Meeting Room and look at the "Open Schedule" ... > >There is a course on "Perl Programming" taught (last Semester) >at Rivier College and I would like to nurture that effort a little more, >if possible. There are lots of students with an interest in Perl at Rivier >College, >so we could contribute in a number of ways by holding a Meeting(s) >there in the future if things work out O. K. (that's one option ...) > >Dr. Richard Greene teaches a number of courses there and put the Perl effort >together. >I would approach him, eventually, to be a Guest Speaker ... He works at >MT Lincoln Labs, and has used Perl in a number of interesting ways > >Southern NH University in Manchester has a wonderful Auditorium, >not too large, where the Manchester Java User's Group (www.ManJug.com) >meets, >on a Monthly basis. The Chairperson of the Computer Information's Systems >Department >is very receptive to assisting Users Groups schedule events there. So, that >is a wonderful setting >for a potential meeting also (Option 2). > >Daniel Webster College in Nashua has been very receptive to scheduling >User's Groups >as you may know (Option 3). > >paulc > >_______________________________________________ >Nh-pm mailing list >Nh-pm@mail.pm.org >http://mail.pm.org/mailman/listinfo/nh-pm From mnh_222 at lycos.com Thu Aug 1 23:47:32 2002 From: mnh_222 at lycos.com (Michael Sh) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Potential Meeting Location Message-ID: Might as well add my two cents... I travel route 101 from the coast to the Peterborough area (and occasionally Keene) pretty regularly, so any suitable location in either Manchester or Nashua would work for me. I don't mind distance as much as I mind bumper-to-bumper traffic... Mike Shields _____________________________________________________ Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads and NoTaglines --> LYCOS MAIL PLUS. http://www.mail.lycos.com/brandPage.shtml?pageId=plus From erikprice at mac.com Thu Aug 1 08:21:53 2002 From: erikprice at mac.com (Erik Price) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values Message-ID: I'm wondering the straight poop on when quotes are needed for strings in list values and hash keys. In PHP, it's not enforced, but it's good form to quote your string literals so that they are not unintentionally interpolated if there is a string constant of the same name. Is this also true of Perl? %hash = (key_is_unquoted => 42); # unquoted key name print "$hash{key_is_unquoted}\n"; # unquoted key, prints: 42 print "$hash{'key_is_unquoted'}\n"; # quoted key, prints: 42 %hash2 = ('key_is_quoted' => 255); # quoted key name print "$hash2{'key_is_quoted}'\n"; # quoted key, prints: 255 print "$hash2{key_is_quoted}\n"; # unquoted key, prints: 255 %hash3 = (key => value); # unquoted key and value print "$hash3{key}\n"; # unquoted key, prints: value print "$hash3{'key'}\n"; # quoted key, prints: value So (apparently), Perl and PHP are similar in that quoting hash keys is not enforced, nor is quoting list values that are string literals? So then, that begs the logical question, is it considered good form to quote string literals in Perl (as in PHP) to avoid confusion with string constants, or is that a personal choice? To add to the confusion, the qw() function turns whitespace-delimited unquoted string literals into a list of quoted string literals, if I'm not mistaken. Your opinions and advice on this are appreciated. Thanks, Erik From pll at lanminds.com Fri Aug 2 08:08:58 2002 From: pll at lanminds.com (Paul Lussier) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) In-Reply-To: Message from bscott@ntisys.com of "Thu, 01 Aug 2002 21:15:47 EDT." References: Message-ID: <20020802130900.0498DF830@tater> In a message dated: Thu, 01 Aug 2002 21:15:47 EDT bscott@ntisys.com said: >On Thu, 1 Aug 2002, at 6:34pm, Paul Courchene wrote: >> I wish to register my (one) vote for a Meeting Place in Nashua. > > I'm actually in favor of Manchester, even though it is a longer drive for >me. GNHLUG already does a lot of stuff in Nashua, and I think it would be >nice to have a more "central" location. > > But, I, too, have only one vote, so I think we should wait for more >responses, too. :-) I'm going to be selfish and vote for someplace in the Fitchburg, MA area, since it's rather close to where I live ;) However, since we are the *nh*pm, I'm guessing my vote won't count for much :) Nashua is much more convenient for me than most anyplace else in NH, however, I can't say how active I'll be in this group outside of piping up on the mailing list from time to time. GNHLUG and MELBA pretty much take up any free time I'm willing to devote to things outside of work and family right now :) -- Seeya, Paul From kclark at CetaceanNetworks.com Fri Aug 2 08:29:44 2002 From: kclark at CetaceanNetworks.com (Kevin D. Clark) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: References: Message-ID: <1rvg6ts81j.fsf@koan.cetaceannetworks.com> Erik Price writes: > I'm wondering the straight poop on when quotes are needed for strings > in list values and hash keys. In PHP, it's not enforced, but it's > good form to quote your string literals so that they are not > unintentionally interpolated if there is a string constant of the same > name. Is this also true of Perl? Yes, this is considered good form in Perl too. In fact, if your turn warnings on in Perl (via "-w"), the Perl compiler will complain. This is a Good Thing. An unadorned identifier in a Perl program that has no other meaning is considered to be a "bareword", and barewords get interpreted as strings. > So > then, that begs the logical question, is it considered good form to > quote string literals in Perl (as in PHP) to avoid confusion with > string constants, or is that a personal choice? ...but if you have a Perl program that contains a bareword, and if some later version of Perl decides to use this same identifier for some purpose, then your program will likely act strangely. So it is considered to be a best practice to quote your strings. > To add to the confusion, the qw() function turns whitespace-delimited > unquoted string literals into a list of quoted string literals, if I'm > not mistaken. No confusion here. This is what qw() is supposed to do. > Your opinions and advice on this are appreciated. Use "-w". Use strict. This is my advice. Regards, --kevin -- Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA) cetaceannetworks.com!kclark (GnuPG ID: B280F24E) alumni.unh.edu!kdc From ben at blackavar.com Fri Aug 2 08:51:04 2002 From: ben at blackavar.com (Ben Boulanger) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: Message-ID: On Thu, 1 Aug 2002, Erik Price wrote: > So (apparently), Perl and PHP are similar in that quoting hash keys is > not enforced, nor is quoting list values that are string literals? So > then, that begs the logical question, is it considered good form to > quote string literals in Perl (as in PHP) to avoid confusion with string > constants, or is that a personal choice? It -is- considered good form to quote strings in Perl. In fact, all of the perl scripts I write begin with perl -w and use strict - strict subs disallows unknown barewords (AFAIK) completely, where -w (warnings on) warns you about them. For example: [bboulanger@.. bboulanger]$ perl -e 'use strict; my $junk = blah;' Bareword "blah" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors. [bboulanger@.. bboulanger]$ perl -we 'my $junk = blah;' Unquoted string "blah" may clash with future reserved word at -e line 1. As for advice - I agree with Kevin - use #!/.../perl -w and use strict Ben -- Better to light a candle than to curse the darkness From erikprice at mac.com Fri Aug 2 09:16:14 2002 From: erikprice at mac.com (Erik Price) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: Message-ID: <6790F366-A622-11D6-BA88-00039351FE6A@mac.com> On Friday, August 2, 2002, at 09:51 AM, Ben Boulanger wrote: > It -is- considered good form to quote strings in Perl. In fact, all of > the perl scripts I write begin with perl -w and use strict - strict subs > disallows unknown barewords (AFAIK) completely, where -w (warnings on) > warns you about them. For example: > > [bboulanger@.. bboulanger]$ perl -e 'use strict; my $junk = blah;' > Bareword "blah" not allowed while "strict subs" in use at -e line 1. > Execution of -e aborted due to compilation errors. > > [bboulanger@.. bboulanger]$ perl -we 'my $junk = blah;' > Unquoted string "blah" may clash with future reserved word at -e line 1. Word to that. (And I'll definitely take you up on the advice of using strict and -w.) But my confusion arose from the fact that even when using strict, hash keys are exempt from the requirement of being quoted strings. localhost:~/tmp$ perl -we 'use strict; my %hash = ('a' => 1); print "$hash{a}\n";' 1 Not only that, but when constructing a list for assignment to a hash, the string literal to the left of a fat arrow (=>) doesn't need to be quoted either! localhost:~/tmp$ perl -we 'use strict; my %hash = (a => 1); print "$hash{a}\n";' 1 This is what I was wondering about. You're not forced to quote these particular string literals even with -w and strict. But ... is it good form to do so? localhost:~/tmp$ perl -we 'use strict; my %hash = ('a' => 1); print "$hash{'a'}\n";' 1 Erik --- Erik Price email: erikprice@mac.com jabber: erikprice@jabber.org From meplists at earthlink.net Fri Aug 2 09:22:25 2002 From: meplists at earthlink.net (Mark Polhamus) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) References: <001701c239ab$9df70e40$8d637dc7@campus.rivier.edu> Message-ID: <3D4A95A1.4040705@earthlink.net> Here's another vote for Manchester, I'm getting tired of driving back to the border from the Lakes Region for just about every NH user group meeting. Why does everything have to be in Nashua? -- that's not really NH, its a piece of Massachusetts that spilled over the state line ;) <-- disarming smiley (disclaimer: I'm originally from MA) -- Mark Polhamus From ben at blackavar.com Fri Aug 2 09:22:04 2002 From: ben at blackavar.com (Ben Boulanger) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: <6790F366-A622-11D6-BA88-00039351FE6A@mac.com> Message-ID: On Fri, 2 Aug 2002, Erik Price wrote: > Word to that. (And I'll definitely take you up on the advice of using > strict and -w.) But my confusion arose from the fact that even when > using strict, hash keys are exempt from the requirement of being quoted > strings. Right you are... I didn't realize you didn't get a warning with the hashkey unquoted. I would -imagine- it's still good form to quote, but.. As this is a different question - I don't know for sure... I will say that if you don't use a number as the assigned value, it does bark a bit: [bboulanger@.. bboulanger]$ perl -we 'use strict; my %blah = (a => yep); print "$blah{a}\n";' Bareword "yep" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors. -- He who hurries can not walk with dignity. From ben at blackavar.com Fri Aug 2 09:27:57 2002 From: ben at blackavar.com (Ben Boulanger) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) In-Reply-To: <3D4A95A1.4040705@earthlink.net> Message-ID: On Fri, 2 Aug 2002, Mark Polhamus wrote: > Here's another vote for Manchester, I'm getting tired of driving back to the > border from the Lakes Region for just about every NH user group meeting. > > Why does everything have to be in Nashua? -- that's not really NH, its a piece > of Massachusetts that spilled over the state line ;) <-- disarming smiley Not sure if you were kidding around, but you're actually absolutely correct:) My fiancee discovered this when we first moved here: http://www.rootsweb.com/~nhcnashu/nashua_history.htm Nashua was originally part of the town of Dunstable, Massachusetts, which also included not only parts of what is now Dunstable, MA., but also Tyngsborough, MA., parts of Hudson, Hollis, Milford, Brookline, and of course Nashua, NH. Chartered in 1673, the township of Dunstable, was founded by Jonathan Tyng, whose frame house overlooked the Merrimack River, in the section of the town which now bears his name. His father, Edward, from Dunstable, England, had given him 3,000 acres some time around 1668, which Jonathan Tyng named Dunstable. -- An overcrowded chicken farm produces fewer eggs. From runge at karlrunge.com Fri Aug 2 10:01:56 2002 From: runge at karlrunge.com (Karl J. Runge) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: Mail from 'Erik Price ' dated: Thu, 1 Aug 2002 09:21:53 -0400 Message-ID: <200208021501.IAA12797@jfku.edu> On Thu, 1 Aug 2002, Erik Price wrote: > %hash3 = (key => value); # unquoted key and value > print "$hash3{key}\n"; # unquoted key, prints: value > print "$hash3{'key'}\n"; # quoted key, prints: value Be careful about barewords like "key" and "value" being interpreted as builtin-functions or subroutines: #!/usr/bin/perl sub foo { return 'bar'; } %hash = (time => time, foo => foo); # time() is a perl builtin foreach $k (keys %hash) { print "$k - $hash{$k}\n"; } yields: foo - bar time - 1028299824 They appear to not be evaluated if it is the hash key, but not so for the value... In general I believe arbitrary expressions can be in either place: $hash{ } = ; The only time I don't quote the bareword is when it is the hash key and only contains word characters, e.g. $hash{foo_bar} = ... but no where else. And I guess only do this because a Perl guru was code reviewing a script of mine and said in *that* case it is OK and the bareword will not be interpreted. I've not read the docs about the scope of this feature, usually tending to use the quotes to be safe. Karl From droberts at mc.com Fri Aug 2 10:07:46 2002 From: droberts at mc.com (David Roberts) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] Perl Monger's Meeting Place (potential) In-Reply-To: <3D4A95A1.4040705@earthlink.net> Message-ID: On Fri, 2 Aug 2002, Mark Polhamus stated in their Email: meplists> From: Mark Polhamus meplists> To: nh-pm@mail.pm.org meplists> Date: Fri, 02 Aug 2002 10:22:25 -0400 meplists> Subject: Re: [Nh-pm] Perl Monger's Meeting Place (potential) meplists> meplists> Here's another vote for Manchester, I'm getting tired of meplists> driving back to the border from the Lakes Region for just meplists> about every NH user group meeting. Guess I'll take pity. I was going to vote for Nashua as it is easier for me (I work in MA), but a "Queen City" meeting place is only 20-30 minutes away for me (depending on which side of the city) so I should be able to make some of the meetings. meplists> Why does everything have to be in Nashua? -- that's not meplists> really NH, its a piece of Massachusetts that spilled over meplists> the state line ;) <-- disarming smiley meplists> meplists> (disclaimer: I'm originally from MA) meplists> Yup. I was raised in central Vermont and now I live in Nashua - go figure... ;) meplists> meplists> -- Mark Polhamus meplists> meplists> meplists> meplists> meplists> _______________________________________________ meplists> Nh-pm mailing list meplists> Nh-pm@mail.pm.org meplists> http://mail.pm.org/mailman/listinfo/nh-pm meplists> David (longing to return to the mountains) Roberts -- Windows - the world's MOST EXPENSIVE virus. Be sure to immunize your PC with Linux - today! From kclark at CetaceanNetworks.com Fri Aug 2 10:37:47 2002 From: kclark at CetaceanNetworks.com (Kevin D. Clark) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: <6790F366-A622-11D6-BA88-00039351FE6A@mac.com> References: <6790F366-A622-11D6-BA88-00039351FE6A@mac.com> Message-ID: Erik Price writes: > But my confusion arose from the fact that even when > using strict, hash keys are exempt from the requirement of being > quoted strings. This is something that you're just going to have to accept. A , the Perl developers decided that hash keys (and a lot of other things...) would automatically be stringified. But they still wanted to encourage people to quote their own strings; thus the warnings that you (sometimes) see. (actually, this had to do with introducing OO abstractions into Perl's code) --kevin -- Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA) cetaceannetworks.com!kclark (GnuPG ID: B280F24E) alumni.unh.edu!kdc From pll at lanminds.com Fri Aug 2 10:59:50 2002 From: pll at lanminds.com (Paul Lussier) Date: Mon Aug 2 21:33:06 2004 Subject: [Nh-pm] quoting list keys & values In-Reply-To: Message from Erik Price of "Fri, 02 Aug 2002 10:16:14 EDT." <6790F366-A622-11D6-BA88-00039351FE6A@mac.com> References: <6790F366-A622-11D6-BA88-00039351FE6A@mac.com> Message-ID: <20020802155951.F41EBF6FE@tater> In a message dated: Fri, 02 Aug 2002 10:16:14 EDT Erik Price said: > But my confusion arose from the fact that even when >using strict, hash keys are exempt from the requirement of being quoted >strings. [...snip...] >This is what I was wondering about. You're not forced to quote these >particular string literals even with -w and strict. But ... is it good >form to do so? Is it good form? Yes. Is it required? No. My personal philosophy is that code should written such that it's obvious what the code is doing to someone else who didn't write it. I'm also a very strong proponent of consistency. So, though I'd ideally prefer: %hash = ( 'foo' => 1, 'bar' => 2, ); I'd rather see: %hash = ( foo => 1, bar => 2, ); than: %hash = ( 'foo' => 1, bar => 2, ); Better consistently wrong, than occasionally right, at least wrt coding practises; since they ycan often be corrected with a simple sed 's/x/y/h', or, perl -e 's/x/y/;' in this case :) -- Seeya, Paul -- 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!