From jacoby at purdue.edu Tue May 8 07:38:44 2012 From: jacoby at purdue.edu (Dave Jacoby) Date: Tue, 08 May 2012 10:38:44 -0400 Subject: [Purdue-pm] Meeting Next Week! And other news Message-ID: <4FA92FF4.8030000@purdue.edu> That's right! We are one week from the next Perl Mongers meeting. We mentioned in the last meeting the idea of covering MVC web development with Dancer, which Rick and I have been *sorta* doing recently. Are there other interesting topics that people in this group can talk on? In other geekery news: * the Lafayette Makerspace Movement has passed the leadership baton to Doug Couch, who will have a callout meeting in Greyhouse Coffee at 6pm Thursday. * Lafayettech has been sponsoring a monthly Hack Day, and the planned Hack Day for June is on the topic of Arduino hacking. * BoilerWeb, a campus group uniting web developers and designers from across Purdue, is meeting this Thursday, May 10, in the PerlMonger time (11:30am-1pm) in the PerlMonger place (WSLR116). The intended topic is Responsive Design, which I still find elusive and exciting a year after hearing about it. -- Dave Jacoby Code Maker, Purdue Genomics Core Lab http://web.ics.purdue.edu/~djacoby 699 days until the end of XP support From derrick at csociety.org Tue May 8 09:51:45 2012 From: derrick at csociety.org (derrick) Date: Tue, 08 May 2012 12:51:45 -0400 Subject: [Purdue-pm] Meeting Next Week! And other news In-Reply-To: <4FA92FF4.8030000@purdue.edu> References: <4FA92FF4.8030000@purdue.edu> Message-ID: <4FA94F21.8020207@csociety.org> put me at the end of the list for a small presentation on using Page Objects with Selenium Webdriver. It is an object oriented way of thinking about web pages. The design pattern originated from java, the examples will be in python, the concepts should universal. dsk On 05/08/2012 10:38 AM, Dave Jacoby wrote: > That's right! We are one week from the next Perl Mongers > meeting. We mentioned in the last meeting the idea of > covering MVC web development with Dancer, which Rick and I > have been *sorta* doing recently. Are there other > interesting topics that people in this group can talk on? > > In other geekery news: > > * the Lafayette Makerspace Movement has passed the > leadership baton to Doug Couch, who will have a callout > meeting in Greyhouse Coffee at 6pm Thursday. > > * Lafayettech has been sponsoring a monthly Hack Day, and > the planned Hack Day for June is on the topic of Arduino > hacking. > > * BoilerWeb, a campus group uniting web developers and > designers from across Purdue, is meeting this Thursday, May > 10, in the PerlMonger time (11:30am-1pm) in the PerlMonger > place (WSLR116). The intended topic is Responsive Design, > which I still find elusive and exciting a year after hearing > about it. > From derrick at csociety.org Tue May 15 05:44:34 2012 From: derrick at csociety.org (derrick) Date: Tue, 15 May 2012 08:44:34 -0400 Subject: [Purdue-pm] Meeting Next Week! And other news In-Reply-To: <4FA94F21.8020207@csociety.org> References: <4FA92FF4.8030000@purdue.edu> <4FA94F21.8020207@csociety.org> Message-ID: <4FB24FB2.9090406@csociety.org> i didn't get to work on my presentation this weekend. I'll have to delay it until the june or july meeting. dsk On 05/08/2012 12:51 PM, derrick wrote: > put me at the end of the list for a small presentation on using Page > Objects with Selenium Webdriver. It is an object oriented way of > thinking about web pages. The design pattern originated from java, the > examples will be in python, the concepts should universal. > > dsk > > On 05/08/2012 10:38 AM, Dave Jacoby wrote: >> That's right! We are one week from the next Perl Mongers >> meeting. We mentioned in the last meeting the idea of >> covering MVC web development with Dancer, which Rick and I >> have been *sorta* doing recently. Are there other >> interesting topics that people in this group can talk on? >> >> In other geekery news: >> >> * the Lafayette Makerspace Movement has passed the >> leadership baton to Doug Couch, who will have a callout >> meeting in Greyhouse Coffee at 6pm Thursday. >> >> * Lafayettech has been sponsoring a monthly Hack Day, and >> the planned Hack Day for June is on the topic of Arduino >> hacking. >> >> * BoilerWeb, a campus group uniting web developers and >> designers from across Purdue, is meeting this Thursday, May >> 10, in the PerlMonger time (11:30am-1pm) in the PerlMonger >> place (WSLR116). The intended topic is Responsive Design, >> which I still find elusive and exciting a year after hearing >> about it. >> > From bradley.d.andersen at gmail.com Wed May 16 09:05:16 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 12:05:16 -0400 Subject: [Purdue-pm] help! Message-ID: I have an HTML file that is composed of other HTML files, something like this:

Blah Blah

now, m10 is just an HTML file somewhere, read into the template like so: open(FH, "$base/m10.html"); $tpl->param("m10" => do { local $/; while () { my $next = ; } }); the $next bit is to ignore the first line, which has css info that I don't want this version to see ... I swear this was working, and now it has mysteriously stopped working :( Here's what Dumper tells me: [Wed May 16 19:54:13 2012] [error] [client xx.xx.x.xxx] FastCGI: stderr: $VAR1 = bless( do{\\(my $o = '')}, 'HTML::Template::VAR' ); Looks to me like it simply is not reading the file into the tpl param. Anything obvious I am missing? Is this so hacky that it would work yesterday and then mysteriously stop today? Is there a better way to read the file into the tpl var? Keep in mind I have about 70 such files going in to this one tpl, and I read them all in using a loop, so, where it says "m10" up there, it could be really m$anything. Thank you, /bda -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at ecn.purdue.edu Wed May 16 09:48:57 2012 From: mark at ecn.purdue.edu (Mark Senn) Date: Wed, 16 May 2012 12:48:57 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: Message-ID: <24337.1337186937@pier.ecn.purdue.edu> > open(FH, "$base/m10.html"); I'd debug this by starting with checking that the file got opened successfully: my $fn = "$base/m10.html"; open FH, '<', $fn or die qq/Can't open "$fn" for input: $!.\nStopped/; -mark From bradley.d.andersen at gmail.com Wed May 16 09:57:24 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 12:57:24 -0400 Subject: [Purdue-pm] help! In-Reply-To: <24337.1337186937@pier.ecn.purdue.edu> References: <24337.1337186937@pier.ecn.purdue.edu> Message-ID: I had this in there earlier, sorry: open(FH, "$base/helping$full.html") || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; it prints nothing :( so i think it _is_ reading the files, but it is not reading them into the tpl->params somehow? On Wed, May 16, 2012 at 12:48 PM, Mark Senn wrote: > > open(FH, "$base/m10.html"); > > I'd debug this by starting with checking that the file > got opened successfully: > > my $fn = "$base/m10.html"; > open FH, '<', $fn or die qq/Can't open "$fn" for input: $!.\nStopped/; > > -mark > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bradley.d.andersen at gmail.com Wed May 16 09:58:20 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 12:58:20 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> Message-ID: I guess next step is to issue prints in the while and watch what happens as I load the page. But man, that's gonna be a lot of output :) On Wed, May 16, 2012 at 12:57 PM, Bradley Andersen < bradley.d.andersen at gmail.com> wrote: > I had this in there earlier, sorry: > open(FH, "$base/helping$full.html") || die "\n\nCould not READ > $base/helping$full.html: [$!]\n\n"; > > it prints nothing :( > > so i think it _is_ reading the files, but it is not reading them into the > tpl->params somehow? > > > > > > On Wed, May 16, 2012 at 12:48 PM, Mark Senn wrote: > >> > open(FH, "$base/m10.html"); >> >> I'd debug this by starting with checking that the file >> got opened successfully: >> >> my $fn = "$base/m10.html"; >> open FH, '<', $fn or die qq/Can't open "$fn" for input: >> $!.\nStopped/; >> >> -mark >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bradley.d.andersen at gmail.com Wed May 16 10:00:33 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 13:00:33 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> Message-ID: ok, just did that. it is CLEARLY reading the entire file set in ;) On Wed, May 16, 2012 at 12:58 PM, Bradley Andersen < bradley.d.andersen at gmail.com> wrote: > I guess next step is to issue prints in the while and watch what happens > as I load the page. But man, that's gonna be a lot of output :) > > > > > On Wed, May 16, 2012 at 12:57 PM, Bradley Andersen < > bradley.d.andersen at gmail.com> wrote: > >> I had this in there earlier, sorry: >> open(FH, "$base/helping$full.html") || die "\n\nCould not READ >> $base/helping$full.html: [$!]\n\n"; >> >> it prints nothing :( >> >> so i think it _is_ reading the files, but it is not reading them into the >> tpl->params somehow? >> >> >> >> >> >> On Wed, May 16, 2012 at 12:48 PM, Mark Senn wrote: >> >>> > open(FH, "$base/m10.html"); >>> >>> I'd debug this by starting with checking that the file >>> got opened successfully: >>> >>> my $fn = "$base/m10.html"; >>> open FH, '<', $fn or die qq/Can't open "$fn" for input: >>> $!.\nStopped/; >>> >>> -mark >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bradley.d.andersen at gmail.com Wed May 16 10:20:46 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 13:20:46 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> Message-ID: ok, i just fixed it, but i'd like to still figure out why it worked then stopped. there must be something wrong with the earlier logic. for reference, here's what i did: i replaced: 1999 #####open(FH, "$base/helping$full.html") || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2000 #####$tpl->param("m$full" => do { local $/; while () { my $next = ; } }); with: 2001 2002 my $contents; 2003 { 2004 local $/; 2005 open(FH, "$base/helping$full.html") || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 $contents = ; 2007 close(FH); 2008 } 2009 $tpl->param("m$full" => $contents); Can you see immediately why the first one would be no good? It almost seems like the tpl->param is not being set as a string. That is, clearly it reads it, but it is not assigning the result properly as a string. All I got were undefs in the log for the earlier logic. I am 199% sure this worked using the earlier logic yesterday. Thanks! /bda On Wed, May 16, 2012 at 1:00 PM, Bradley Andersen < bradley.d.andersen at gmail.com> wrote: > ok, just did that. > > it is CLEARLY reading the entire file set in ;) > > > > > On Wed, May 16, 2012 at 12:58 PM, Bradley Andersen < > bradley.d.andersen at gmail.com> wrote: > >> I guess next step is to issue prints in the while and watch what happens >> as I load the page. But man, that's gonna be a lot of output :) >> >> >> >> >> On Wed, May 16, 2012 at 12:57 PM, Bradley Andersen < >> bradley.d.andersen at gmail.com> wrote: >> >>> I had this in there earlier, sorry: >>> open(FH, "$base/helping$full.html") || die "\n\nCould not READ >>> $base/helping$full.html: [$!]\n\n"; >>> >>> it prints nothing :( >>> >>> so i think it _is_ reading the files, but it is not reading them into >>> the tpl->params somehow? >>> >>> >>> >>> >>> >>> On Wed, May 16, 2012 at 12:48 PM, Mark Senn wrote: >>> >>>> > open(FH, "$base/m10.html"); >>>> >>>> I'd debug this by starting with checking that the file >>>> got opened successfully: >>>> >>>> my $fn = "$base/m10.html"; >>>> open FH, '<', $fn or die qq/Can't open "$fn" for input: >>>> $!.\nStopped/; >>>> >>>> -mark >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gizmo at purdue.edu Wed May 16 10:25:48 2012 From: gizmo at purdue.edu (Joe Kline) Date: Wed, 16 May 2012 13:25:48 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> Message-ID: <4FB3E31C.1080508@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/16/2012 01:20 PM, Bradley Andersen wrote: > ok, i just fixed it, but i'd like to still figure out why it worked > then stopped. there must be something wrong with the earlier > logic. for reference, here's what i did: > > i replaced: 1999 #####open(FH, > "$base/helping$full.html") || die "\n\nCould not READ > $base/helping$full.html: [$!]\n\n"; 2000 > #####$tpl->param("m$full" => do { local $/; while () { my $next > = ; } }); > > with: 2001 2002 my $contents; 2003 { 2004 > local $/; 2005 open(FH, "$base/helping$full.html") > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 > $contents = ; 2007 close(FH); 2008 > } 2009 $tpl->param("m$full" => $contents); > > Can you see immediately why the first one would be no good? It > almost seems like the tpl->param is not being set as a string. > That is, clearly it reads it, but it is not assigning the result > properly as a string. All I got were undefs in the log for the > earlier logic. I am 199% sure this worked using the earlier logic > yesterday. > Brad, I don't see much of a reason why the file slurping wasn't working...maybe that bit to strip the first line out was a bit too much? It took me a bit to figure out why that slurp line looked familiar but odd: http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html I guess just an example where the less clever option worked out better. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi =uVn0 -----END PGP SIGNATURE----- From bradley.d.andersen at gmail.com Wed May 16 10:27:33 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 13:27:33 -0400 Subject: [Purdue-pm] help! In-Reply-To: <4FB3E31C.1080508@purdue.edu> References: <24337.1337186937@pier.ecn.purdue.edu> <4FB3E31C.1080508@purdue.edu> Message-ID: Yeah, in the end I don't care if it is clever or not, so long as the code works and it is readable :) On Wed, May 16, 2012 at 1:25 PM, Joe Kline wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 05/16/2012 01:20 PM, Bradley Andersen wrote: > > ok, i just fixed it, but i'd like to still figure out why it worked > > then stopped. there must be something wrong with the earlier > > logic. for reference, here's what i did: > > > > i replaced: 1999 #####open(FH, > > "$base/helping$full.html") || die "\n\nCould not READ > > $base/helping$full.html: [$!]\n\n"; 2000 > > #####$tpl->param("m$full" => do { local $/; while () { my $next > > = ; } }); > > > > with: 2001 2002 my $contents; 2003 { 2004 > > local $/; 2005 open(FH, "$base/helping$full.html") > > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 > > $contents = ; 2007 close(FH); 2008 > > } 2009 $tpl->param("m$full" => $contents); > > > > Can you see immediately why the first one would be no good? It > > almost seems like the tpl->param is not being set as a string. > > That is, clearly it reads it, but it is not assigning the result > > properly as a string. All I got were undefs in the log for the > > earlier logic. I am 199% sure this worked using the earlier logic > > yesterday. > > > > Brad, > > I don't see much of a reason why the file slurping wasn't > working...maybe that bit to strip the first line out was a bit too much? > > It took me a bit to figure out why that slurp line looked familiar but > odd: > > http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html > > I guess just an example where the less clever option worked out better. > > joe > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy > hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi > =uVn0 > -----END PGP SIGNATURE----- > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bradley.d.andersen at gmail.com Wed May 16 10:49:17 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 13:49:17 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> <4FB3E31C.1080508@purdue.edu> Message-ID: I have just confirmed using the latter (new) method that the first does not do what I had thought (skip first line of the file read). So Joe's comment about trying to be too clever on that bit looks correct. On Wed, May 16, 2012 at 1:27 PM, Bradley Andersen < bradley.d.andersen at gmail.com> wrote: > Yeah, in the end I don't care if it is clever or not, so long as the code > works and it is readable :) > > > > > On Wed, May 16, 2012 at 1:25 PM, Joe Kline wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 05/16/2012 01:20 PM, Bradley Andersen wrote: >> > ok, i just fixed it, but i'd like to still figure out why it worked >> > then stopped. there must be something wrong with the earlier >> > logic. for reference, here's what i did: >> > >> > i replaced: 1999 #####open(FH, >> > "$base/helping$full.html") || die "\n\nCould not READ >> > $base/helping$full.html: [$!]\n\n"; 2000 >> > #####$tpl->param("m$full" => do { local $/; while () { my $next >> > = ; } }); >> > >> > with: 2001 2002 my $contents; 2003 { 2004 >> > local $/; 2005 open(FH, "$base/helping$full.html") >> > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 >> > $contents = ; 2007 close(FH); 2008 >> > } 2009 $tpl->param("m$full" => $contents); >> > >> > Can you see immediately why the first one would be no good? It >> > almost seems like the tpl->param is not being set as a string. >> > That is, clearly it reads it, but it is not assigning the result >> > properly as a string. All I got were undefs in the log for the >> > earlier logic. I am 199% sure this worked using the earlier logic >> > yesterday. >> > >> >> Brad, >> >> I don't see much of a reason why the file slurping wasn't >> working...maybe that bit to strip the first line out was a bit too much? >> >> It took me a bit to figure out why that slurp line looked familiar but >> odd: >> >> http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html >> >> I guess just an example where the less clever option worked out better. >> >> joe >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v2.0.14 (GNU/Linux) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >> iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy >> hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi >> =uVn0 >> -----END PGP SIGNATURE----- >> _______________________________________________ >> Purdue-pm mailing list >> Purdue-pm at pm.org >> http://mail.pm.org/mailman/listinfo/purdue-pm >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From km1921 at att.com Wed May 16 10:53:31 2012 From: km1921 at att.com (MCNAMARA, KEN) Date: Wed, 16 May 2012 17:53:31 +0000 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> <4FB3E31C.1080508@purdue.edu> Message-ID: The sub routine returns the ?last evaluated expression?. If you wrote (in the body of the subroutine): my $value; while() { $value = $_; } return $value; Then you get the contents of the file as intended. my $next = ; -- is meaningless since FH was already at end of file in ?while()?. KenMc From: purdue-pm-bounces+km1921=att.com at pm.org [mailto:purdue-pm-bounces+km1921=att.com at pm.org] On Behalf Of Bradley Andersen Sent: Wednesday, May 16, 2012 1:49 PM To: Joe Kline Cc: mark at purdue.edu; Purdue Perl Mongers Subject: Re: [Purdue-pm] help! I have just confirmed using the latter (new) method that the first does not do what I had thought (skip first line of the file read). So Joe's comment about trying to be too clever on that bit looks correct. On Wed, May 16, 2012 at 1:27 PM, Bradley Andersen > wrote: Yeah, in the end I don't care if it is clever or not, so long as the code works and it is readable :) On Wed, May 16, 2012 at 1:25 PM, Joe Kline > wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/16/2012 01:20 PM, Bradley Andersen wrote: > ok, i just fixed it, but i'd like to still figure out why it worked > then stopped. there must be something wrong with the earlier > logic. for reference, here's what i did: > > i replaced: 1999 #####open(FH, > "$base/helping$full.html") || die "\n\nCould not READ > $base/helping$full.html: [$!]\n\n"; 2000 > #####$tpl->param("m$full" => do { local $/; while () { my $next > = ; } }); > > with: 2001 2002 my $contents; 2003 { 2004 > local $/; 2005 open(FH, "$base/helping$full.html") > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 > $contents = ; 2007 close(FH); 2008 > } 2009 $tpl->param("m$full" => $contents); > > Can you see immediately why the first one would be no good? It > almost seems like the tpl->param is not being set as a string. > That is, clearly it reads it, but it is not assigning the result > properly as a string. All I got were undefs in the log for the > earlier logic. I am 199% sure this worked using the earlier logic > yesterday. > Brad, I don't see much of a reason why the file slurping wasn't working...maybe that bit to strip the first line out was a bit too much? It took me a bit to figure out why that slurp line looked familiar but odd: http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html I guess just an example where the less clever option worked out better. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi =uVn0 -----END PGP SIGNATURE----- _______________________________________________ Purdue-pm mailing list Purdue-pm at pm.org http://mail.pm.org/mailman/listinfo/purdue-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From bradley.d.andersen at gmail.com Wed May 16 10:54:58 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 13:54:58 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> <4FB3E31C.1080508@purdue.edu> Message-ID: so i guess my error was in thinking that would somehow skip the first line of the file being read in. now i need a different way to do that. On Wed, May 16, 2012 at 1:53 PM, MCNAMARA, KEN wrote: > The sub routine returns the ?last evaluated expression?.**** > > ** ** > > If you wrote (in the body of the subroutine):**** > > ** ** > > my $value;**** > > while() { $value = $_; }**** > > return $value;**** > > ** ** > > Then you get the contents of the file as intended.**** > > ** ** > > my $next = ; -- is meaningless since FH was already at end of file in > ?while()?.**** > > ** ** > > KenMc**** > > ** ** > > *From:* purdue-pm-bounces+km1921=att.com at pm.org [mailto: > purdue-pm-bounces+km1921=att.com at pm.org] *On Behalf Of *Bradley Andersen > *Sent:* Wednesday, May 16, 2012 1:49 PM > *To:* Joe Kline > *Cc:* mark at purdue.edu; Purdue Perl Mongers > *Subject:* Re: [Purdue-pm] help!**** > > ** ** > > I have just confirmed using the latter (new) method that the first > does not do what I had thought (skip first line of the file read). > > So Joe's comment about trying to be too clever on that bit looks correct. > > > **** > > On Wed, May 16, 2012 at 1:27 PM, Bradley Andersen < > bradley.d.andersen at gmail.com> wrote:**** > > Yeah, in the end I don't care if it is clever or not, so long as the code > works and it is readable :)**** > > > > > **** > > On Wed, May 16, 2012 at 1:25 PM, Joe Kline wrote:**** > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1**** > > > On 05/16/2012 01:20 PM, Bradley Andersen wrote: > > ok, i just fixed it, but i'd like to still figure out why it worked > > then stopped. there must be something wrong with the earlier > > logic. for reference, here's what i did: > > > > i replaced: 1999 #####open(FH, > > "$base/helping$full.html") || die "\n\nCould not READ > > $base/helping$full.html: [$!]\n\n"; 2000 > > #####$tpl->param("m$full" => do { local $/; while () { my $next > > = ; } }); > > > > with: 2001 2002 my $contents; 2003 { 2004 > > local $/; 2005 open(FH, "$base/helping$full.html") > > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 > > $contents = ; 2007 close(FH); 2008 > > } 2009 $tpl->param("m$full" => $contents); > > > > Can you see immediately why the first one would be no good? It > > almost seems like the tpl->param is not being set as a string. > > That is, clearly it reads it, but it is not assigning the result > > properly as a string. All I got were undefs in the log for the > > earlier logic. I am 199% sure this worked using the earlier logic > > yesterday. > >**** > > Brad, > > I don't see much of a reason why the file slurping wasn't > working...maybe that bit to strip the first line out was a bit too much? > > It took me a bit to figure out why that slurp line looked familiar but > odd: > > http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html > > I guess just an example where the less clever option worked out better. > > joe > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy > hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi > =uVn0 > -----END PGP SIGNATURE----- > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm**** > > ** ** > > ** ** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From km1921 at att.com Wed May 16 10:57:29 2012 From: km1921 at att.com (MCNAMARA, KEN) Date: Wed, 16 May 2012 17:57:29 +0000 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> <4FB3E31C.1080508@purdue.edu> Message-ID: My preference would be to read the file line by line and apply a regex ? that gives you finer control ? and it?s easier to add features going forward (with additional regexes). The performance hit (in most cases) isn?t noticeable. KenMc From: Bradley Andersen [mailto:bradley.d.andersen at gmail.com] Sent: Wednesday, May 16, 2012 1:55 PM To: MCNAMARA, KEN Cc: Joe Kline; mark at purdue.edu; Purdue Perl Mongers Subject: Re: [Purdue-pm] help! so i guess my error was in thinking that would somehow skip the first line of the file being read in. now i need a different way to do that. On Wed, May 16, 2012 at 1:53 PM, MCNAMARA, KEN > wrote: The sub routine returns the ?last evaluated expression?. If you wrote (in the body of the subroutine): my $value; while() { $value = $_; } return $value; Then you get the contents of the file as intended. my $next = ; -- is meaningless since FH was already at end of file in ?while()?. KenMc From: purdue-pm-bounces+km1921=att.com at pm.org [mailto:purdue-pm-bounces+km1921=att.com at pm.org] On Behalf Of Bradley Andersen Sent: Wednesday, May 16, 2012 1:49 PM To: Joe Kline Cc: mark at purdue.edu; Purdue Perl Mongers Subject: Re: [Purdue-pm] help! I have just confirmed using the latter (new) method that the first does not do what I had thought (skip first line of the file read). So Joe's comment about trying to be too clever on that bit looks correct. On Wed, May 16, 2012 at 1:27 PM, Bradley Andersen > wrote: Yeah, in the end I don't care if it is clever or not, so long as the code works and it is readable :) On Wed, May 16, 2012 at 1:25 PM, Joe Kline > wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/16/2012 01:20 PM, Bradley Andersen wrote: > ok, i just fixed it, but i'd like to still figure out why it worked > then stopped. there must be something wrong with the earlier > logic. for reference, here's what i did: > > i replaced: 1999 #####open(FH, > "$base/helping$full.html") || die "\n\nCould not READ > $base/helping$full.html: [$!]\n\n"; 2000 > #####$tpl->param("m$full" => do { local $/; while () { my $next > = ; } }); > > with: 2001 2002 my $contents; 2003 { 2004 > local $/; 2005 open(FH, "$base/helping$full.html") > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 > $contents = ; 2007 close(FH); 2008 > } 2009 $tpl->param("m$full" => $contents); > > Can you see immediately why the first one would be no good? It > almost seems like the tpl->param is not being set as a string. > That is, clearly it reads it, but it is not assigning the result > properly as a string. All I got were undefs in the log for the > earlier logic. I am 199% sure this worked using the earlier logic > yesterday. > Brad, I don't see much of a reason why the file slurping wasn't working...maybe that bit to strip the first line out was a bit too much? It took me a bit to figure out why that slurp line looked familiar but odd: http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html I guess just an example where the less clever option worked out better. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi =uVn0 -----END PGP SIGNATURE----- _______________________________________________ Purdue-pm mailing list Purdue-pm at pm.org http://mail.pm.org/mailman/listinfo/purdue-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From bradley.d.andersen at gmail.com Wed May 16 11:00:27 2012 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 16 May 2012 14:00:27 -0400 Subject: [Purdue-pm] help! In-Reply-To: References: <24337.1337186937@pier.ecn.purdue.edu> <4FB3E31C.1080508@purdue.edu> Message-ID: I think I need to go that route. What I am trying to do is _not_ read in the css defn for the mobile version (I have a mobile version and a standard version and they read for this section the same files), as it has it's own styles, and the standard version borks the view ... trying to do that with a regex is probably not the best way. I appreciate the help, all! /bda On Wed, May 16, 2012 at 1:57 PM, MCNAMARA, KEN wrote: > My preference would be to read the file line by line and apply a regex ? > that gives you finer control ? and it?s easier to add features going > forward (with additional regexes).**** > > ** ** > > The performance hit (in most cases) isn?t noticeable.**** > > ** ** > > KenMc**** > > ** ** > > *From:* Bradley Andersen [mailto:bradley.d.andersen at gmail.com] > *Sent:* Wednesday, May 16, 2012 1:55 PM > *To:* MCNAMARA, KEN > *Cc:* Joe Kline; mark at purdue.edu; Purdue Perl Mongers > *Subject:* Re: [Purdue-pm] help!**** > > ** ** > > so i guess my error was in thinking that would somehow skip the first line > of the file being read in. now i need a different way to do that. > > > **** > > On Wed, May 16, 2012 at 1:53 PM, MCNAMARA, KEN wrote:**** > > The sub routine returns the ?last evaluated expression?.**** > > **** > > If you wrote (in the body of the subroutine):**** > > **** > > my $value;**** > > while() { $value = $_; }**** > > return $value;**** > > **** > > Then you get the contents of the file as intended.**** > > **** > > my $next = ; -- is meaningless since FH was already at end of file in > ?while()?.**** > > **** > > KenMc**** > > **** > > *From:* purdue-pm-bounces+km1921=att.com at pm.org [mailto: > purdue-pm-bounces+km1921=att.com at pm.org] *On Behalf Of *Bradley Andersen > *Sent:* Wednesday, May 16, 2012 1:49 PM > *To:* Joe Kline > *Cc:* mark at purdue.edu; Purdue Perl Mongers > *Subject:* Re: [Purdue-pm] help!**** > > **** > > I have just confirmed using the latter (new) method that the first > does not do what I had thought (skip first line of the file read). > > So Joe's comment about trying to be too clever on that bit looks correct. > > **** > > On Wed, May 16, 2012 at 1:27 PM, Bradley Andersen < > bradley.d.andersen at gmail.com> wrote:**** > > Yeah, in the end I don't care if it is clever or not, so long as the code > works and it is readable :)**** > > > > **** > > On Wed, May 16, 2012 at 1:25 PM, Joe Kline wrote:**** > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1**** > > > On 05/16/2012 01:20 PM, Bradley Andersen wrote: > > ok, i just fixed it, but i'd like to still figure out why it worked > > then stopped. there must be something wrong with the earlier > > logic. for reference, here's what i did: > > > > i replaced: 1999 #####open(FH, > > "$base/helping$full.html") || die "\n\nCould not READ > > $base/helping$full.html: [$!]\n\n"; 2000 > > #####$tpl->param("m$full" => do { local $/; while () { my $next > > = ; } }); > > > > with: 2001 2002 my $contents; 2003 { 2004 > > local $/; 2005 open(FH, "$base/helping$full.html") > > || die "\n\nCould not READ $base/helping$full.html: [$!]\n\n"; 2006 > > $contents = ; 2007 close(FH); 2008 > > } 2009 $tpl->param("m$full" => $contents); > > > > Can you see immediately why the first one would be no good? It > > almost seems like the tpl->param is not being set as a string. > > That is, clearly it reads it, but it is not assigning the result > > properly as a string. All I got were undefs in the log for the > > earlier logic. I am 199% sure this worked using the earlier logic > > yesterday. > >**** > > Brad, > > I don't see much of a reason why the file slurping wasn't > working...maybe that bit to strip the first line out was a bit too much? > > It took me a bit to figure out why that slurp line looked familiar but > odd: > > http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html > > I guess just an example where the less clever option worked out better. > > joe > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk+z4xwACgkQb0mzA2gRTpkaZwCghpbMGF2dWaw0kiEXaEjWf0Uy > hQsAn2YFkhpY5WPmVPe9BsMTTSC7gphi > =uVn0 > -----END PGP SIGNATURE----- > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm**** > > **** > > **** > > ** ** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jacoby at purdue.edu Mon May 21 09:38:21 2012 From: jacoby at purdue.edu (Dave Jacoby) Date: Mon, 21 May 2012 12:38:21 -0400 Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? Message-ID: <4FBA6F7D.5080207@purdue.edu> Since O'Reilly knows I have Programming Perl 3rd (and 2nd, and 1st), they take 40% off the $55 and offer it to me at $32. Free shipping, potential tax (haven't hit "go" yet) so $35. I want it. But I'm not yet convinced. Most any technical issue I hit, my first (and normally only) step is to type "my technical issue" into Google and find the answer. My primary use of Dynamic HTML: The Definitive Guide is to lift my laptop roughly two inches. I'm not yet convinced that I will use it. I think I want it inpaper for about the same reason I want to get Mockingbird Time by the Jayhawks on CD: I have the previous works in physical form and my continued collection trumps my rejection of the form otherwise. My logical self recognizes this as a problem. So, should I pull the trigger? -- Dave Jacoby Code Maker, Purdue Genomics Core Lab http://web.ics.purdue.edu/~djacoby 686 days until the end of XP support From mdw at purdue.edu Mon May 21 09:43:46 2012 From: mdw at purdue.edu (Mark Daniel Ward) Date: Mon, 21 May 2012 12:43:46 -0400 Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? In-Reply-To: <4FBA6F7D.5080207@purdue.edu> References: <4FBA6F7D.5080207@purdue.edu> Message-ID: <4FBA70C2.6060506@purdue.edu> Dear Dave, It was just $29.19 back in March on Amazon. It's still $32.99 (40%) on Amazon at present, with free shipping and no tax. Just FYI. Of course you might not like supporting the huge website Amazon either.... Just a thought.... FYI, if you (or others) on this list haven't seen it yet, I strongly recommend camelcamelcamel.com as my favorite site on the web, because it allows me to do Amazon price tracking, and it notifies me if a book drops to my desired price, and it doesn't cost me anything. It has been my favorite website for 2 years now. If you buy books from Amazon, you should know about this site, for sure. You'll wonder what life was like before you saw it. A guy in Chicago runs this site in his spare time. I learned about it years ago from the NY Times. Enjoy! camelcamelcamel.com/product/0596004923 Mark On 5/21/12 12:38 PM, Dave Jacoby wrote: > Since O'Reilly knows I have Programming Perl 3rd (and 2nd, and 1st), > they take 40% off the $55 and offer it to me at $32. Free shipping, > potential tax (haven't hit "go" yet) so $35. > > I want it. But I'm not yet convinced. > > Most any technical issue I hit, my first (and normally only) step is > to type "my technical issue" into Google and find the answer. My > primary use of Dynamic HTML: The Definitive Guide is to lift my laptop > roughly two inches. I'm not yet convinced that I will use it. I think > I want it inpaper for about the same reason I want to get Mockingbird > Time by the Jayhawks on CD: I have the previous works in physical form > and my continued collection trumps my rejection of the form otherwise. > My logical self recognizes this as a problem. > > So, should I pull the trigger? > -- 8th International Purdue Symposium on Statistics "Diversity in the Statistical Sciences for the 21st Century" http://www.stat.purdue.edu/symp2012/ Purdue University, June 20 - 24, 2012 From km1921 at att.com Mon May 21 10:04:43 2012 From: km1921 at att.com (MCNAMARA, KEN) Date: Mon, 21 May 2012 17:04:43 +0000 Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? In-Reply-To: <4FBA6F7D.5080207@purdue.edu> References: <4FBA6F7D.5080207@purdue.edu> Message-ID: A better choice might be 'Learning Perl 6th Ed' by Schwartz, d foy and Phoenix. This book is better than a reference in the respect that it explores some background about why Perl works the way it does and some of the underlying philosophy that followed when writing it. It also educates about common idioms that masters (such as Schwartz) take for granted that all Perl programmers understand. The author says the book is 'It's just a tutorial. It's not comprehensive." -- but the extensive footnotes give insights that other books miss. KenMc -----Original Message----- From: purdue-pm-bounces+km1921=att.com at pm.org [mailto:purdue-pm-bounces+km1921=att.com at pm.org] On Behalf Of Dave Jacoby Sent: Monday, May 21, 2012 12:38 PM To: Purdue Perl Mongers Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? Since O'Reilly knows I have Programming Perl 3rd (and 2nd, and 1st), they take 40% off the $55 and offer it to me at $32. Free shipping, potential tax (haven't hit "go" yet) so $35. I want it. But I'm not yet convinced. Most any technical issue I hit, my first (and normally only) step is to type "my technical issue" into Google and find the answer. My primary use of Dynamic HTML: The Definitive Guide is to lift my laptop roughly two inches. I'm not yet convinced that I will use it. I think I want it inpaper for about the same reason I want to get Mockingbird Time by the Jayhawks on CD: I have the previous works in physical form and my continued collection trumps my rejection of the form otherwise. My logical self recognizes this as a problem. So, should I pull the trigger? -- Dave Jacoby Code Maker, Purdue Genomics Core Lab http://web.ics.purdue.edu/~djacoby 686 days until the end of XP support _______________________________________________ Purdue-pm mailing list Purdue-pm at pm.org http://mail.pm.org/mailman/listinfo/purdue-pm From jacoby at purdue.edu Mon May 21 10:19:31 2012 From: jacoby at purdue.edu (Dave Jacoby) Date: Mon, 21 May 2012 13:19:31 -0400 Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? In-Reply-To: <4FBA70C2.6060506@purdue.edu> References: <4FBA6F7D.5080207@purdue.edu> <4FBA70C2.6060506@purdue.edu> Message-ID: <4FBA7923.3040107@purdue.edu> On 5/21/2012 12:43 PM, Mark Daniel Ward wrote: > > It was just $29.19 back in March on Amazon. It's still $32.99 (40%) on > Amazon at present, with free shipping and no tax. Just FYI. Of course > you might not like supporting the huge website Amazon either.... Just a > thought.... I didn't catch that sweet spot. I don't always have cash on hand when I want it. I have bought another O book as an ebook, and I like that if I buy from Tim himself, I get the no-DRM pdfs and epub, readable on whatever I want, which I don't get if I get the book via Amazon or B&N, but I know there's a premium for that. But that doesn't touch the reason I want it. As long as I'm at Purdue, I can read it on Safari. (OK, not right now. I'm going to have to ask about that.) The point of buying it is so I can have 1 through 4 on the same shelf, to show my continued loyalty to Perl and to O'Reilly. I'm not conflicted in liking and promoting Perl. I'm not conflicted in liking and promoting O'Reilly books. I'm not sure that, even at ~ $20 off cover, it is what I want to do right now. -- Dave Jacoby Code Maker, Purdue Genomics Core Lab http://web.ics.purdue.edu/~djacoby 686 days until the end of XP support From mark at purdue.edu Mon May 21 10:26:53 2012 From: mark at purdue.edu (Mark Senn) Date: Mon, 21 May 2012 13:26:53 -0400 Subject: [Purdue-pm] Perl 5.16.0 is now available Message-ID: <18414.1337621213@pier.ecn.purdue.edu> Perl 5.16.0 is now available. See http://www.nntp.perl.org/group/perl.perl5.porters/2012/05/msg186903.html for more info. >From http://shop.oreilly.com/product/9780596004927.do In this much-anticipated update to "the Camel," [_Programming Perl_ has had a camel on the cover since the first edition in 1991 -mark] three renowned Perl authors cover the language up to its current version, Perl 5.14, with a preview of features in the upcoming 5.16. In my opinion an up-to-date version of "the Camel" is a tool that any serious Perl Programmer should have. -mark From mark at ecn.purdue.edu Mon May 21 10:36:58 2012 From: mark at ecn.purdue.edu (Mark Senn) Date: Mon, 21 May 2012 13:36:58 -0400 Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? In-Reply-To: <4FBA7923.3040107@purdue.edu> References: <4FBA6F7D.5080207@purdue.edu> <4FBA70C2.6060506@purdue.edu> <4FBA7923.3040107@purdue.edu> Message-ID: <22116.1337621818@pier.ecn.purdue.edu> > As long as I'm at Purdue, I can read it on Safari. (OK, not right now. > I'm going to have to ask about that.) Safari (an online collection of books) has been unreliable for me in the past, too. I've given up on getting often-used tools from there. -mark From gizmo at purdue.edu Mon May 21 13:31:56 2012 From: gizmo at purdue.edu (Joe Kline) Date: Mon, 21 May 2012 16:31:56 -0400 Subject: [Purdue-pm] Programming Perl, 4th Ed: Should I? In-Reply-To: References: <4FBA6F7D.5080207@purdue.edu> Message-ID: <4FBAA63C.70702@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have it but I'm a glutton for punishment. I'm that weird bird that likes to have print and digital. I really like that O'Reilly offers DRM-free formats. I would say that the digital version is worth it. Paper...more of a sentimental reason than anything. Now, a paper version that is worth it I think is Modern Perl and Effective Perl Programming (both editions really, but 2nd if you had to choose). Chromatic and brian d foy are amazing authors (and Josh on the EFP) I am looking forward to see Ovid's Perl book (another intro/overview book). I agree that Learning Perl is quite a good book as well. Hmmm, I guess I'm too much of a bibliophile to say no to books, let alone Perl books. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+6pjwACgkQb0mzA2gRTpl3xQCeJ9rRkNiF0qq0GqX2yNhTOBQQ O/EAoI3TBMXVIs+KjfwgJ8a9kpB3nUQZ =6Dt2 -----END PGP SIGNATURE----- From mark at purdue.edu Mon May 28 10:40:54 2012 From: mark at purdue.edu (Mark Senn) Date: Mon, 28 May 2012 13:40:54 -0400 Subject: [Purdue-pm] Yet Another Perl Conference Message-ID: <18747.1338226854@pier.ecn.purdue.edu> (I am forwarding this as requested. Personal observation from attending Yet Another Perl Conferences in the past: some people stay out too late during nights of the conference drinking and aren't ready for the conference the next day.) Date: Mon, 28 May 2012 02:34:07 -0400 From: Uri Guttman To: pm_groups at pm.org Subject: [pm_groups] yapc::na arrival dinner hi pm leaders, please forward this to your local pm if you know of any of your members who are going to yapc::na in madison WI. it is sold out but we need to get some information to many of the attendees. thanx, uri hi to all yapc::na attendees, if you haven't signed up to the yapc mailing list, please do so. it is the primary area to interact with other yapc attendees (world wide). you can discuss events, best local beers, sharing rides/rooms, rental cars, places to eat, hackathon projects, games to play etc. you can sign up on this page: http://mail.pm.org/mailman/listinfo/yapc one of the major social events of yapc::na has been the arrival dinner. it will be on tuesday, june 11 from 7-10 pm at moe's grill and tavern. if you are planning to attend please signup on this wiki page. we need a quality head count for them to arrange for enough food. we are getting drink deals (1/2 price on margaritas so far and something for beer is in the works) so read that page also for updates. if you are on a strict budget because you are a student or underemployed, we will have several scholarships. contact me off list if you want one of them. http://act.yapcna.org/2012/wiki?node=Arrival%20Dinner hope to see you at yapc::na and the arrival dinner! thanx, uri -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups