From jalex at pobox.com Tue Sep 9 20:02:46 2008 From: jalex at pobox.com (Jason) Date: Tue, 9 Sep 2008 23:02:46 -0400 Subject: [Columbus-pm] Fwd: [pm_groups] Pittsburgh Perl Workshop 2008 In-Reply-To: <5AA97519-D95F-4F5F-86F3-EC375D7795DA@robertblackwell.com> References: <5AA97519-D95F-4F5F-86F3-EC375D7795DA@robertblackwell.com> Message-ID: <8d5e76f20809092002y5bff09dcjccbed559e5dee079@mail.gmail.com> ---------- Forwarded message ---------- From: Robert Blackwell Date: Tue, Sep 9, 2008 at 9:22 PM Subject: [pm_groups] Pittsburgh Perl Workshop 2008 To: pm_groups at pm.org Please forward this to your local Perl Monger group or anywhere you think it might find people interested in perl. Thanks Robert Blackwell The Pittsburgh Perl Workshop is a low-cost technical conference held at the Carnegie Mellon University's Oakland Campus. The workshop will be held on October 11?12 2008. * Talk Proposals * Classes * Hack-a-thons * Talk Proposals The deadline for talk proposals in by 12 September 2008. The Pittsburgh Perl Workshop 2008 is the perfect opportunity to share your ideas, code, and projects with masses of code-loving Perl hackers. Shouldn't you have a speaking slot at this year's event? Shouldn't you experience the full, PPW-powered glory that only speakers can know? Of course you should! Haven't you ... done interesting stuff for Perl? written cool code? seen the future of Perl? got a story to tell? got a trick to share? In fact, if you have anything to say that would interest Perl people, we want to hear you say it! Just go to http://pghpw.org and submit a talk proposal. It's that easy. But don't delay. Get your proposal in by 12 September 2008 -- or else you might miss out. Seize the day! Own the fun! Submit a talk proposal for PPW 2008 now! * Classes This year we are offering three great classes: Dan Klein is back teaching From Zero to Perl. http://pghpw.org/ppw2008/zerotoperl.html Peter Scott - Maintaining Code While Staying Sane http://pghpw.org/ppw2008/maintainingcode.html brian d foy - Mastering Perl http://pghpw.org/ppw2008/masteringperl.html * Hack-a-thons We are having a Rakudo, (Perl 6) hack-a-thon. -- 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 -- Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From alperyilmaz at gmail.com Fri Sep 26 22:30:54 2008 From: alperyilmaz at gmail.com (Alper Yilmaz) Date: Sat, 27 Sep 2008 01:30:54 -0400 Subject: [Columbus-pm] hash of hashes Message-ID: Hi Columbus Perl Mongers, I'm the webmaster of www.grassius.org , the site is developed with Perl by HTML::Mason. I also used Bio::Perl modules in addition to pure Perl. However, my background is in biology and I learned/used Perl within a year. I'm having trouble with complex data structures such as hash of hashes. Even though I read tutorials or manuals I'm not getting it, since I learn visually. I think I'll learn faster if someone can show me. So, I was wondering if there's anybody in Columbus who can meet 1-2 times and explain and show hash of hashes to me? If there are any classes locally taught, that'll work as well. thanks, -- Alper Post-doctoral Researcher Plant Biotechnology Center The Ohio State University 1060 Carmack Rd Columbus, OH 43210 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chuck.Day at s1te.com Sat Sep 27 05:08:37 2008 From: Chuck.Day at s1te.com (Chuck Day) Date: Sat, 27 Sep 2008 08:08:37 -0400 (EDT) Subject: [Columbus-pm] hash of hashes In-Reply-To: References: Message-ID: <4067.75.118.24.175.1222517317.squirrel@WWW.S1TE.COM> Alper, Hashes might be my favorite use of perl. Especially hashes of hashes and hashes of arrays. I have about 10 pages of notes on these and would be happy to meet you over coffee anytime. Just give me a ring at 614-598-5559. Chuck > Hi Columbus Perl Mongers, > > I'm the webmaster of www.grassius.org , the site is developed with Perl by > HTML::Mason. I also used Bio::Perl modules in addition to pure Perl. > However, my background is in biology and I learned/used Perl within a year. > I'm having trouble with complex data structures such as hash of hashes. Even > though I read tutorials or manuals I'm not getting it, since I learn > visually. I think I'll learn faster if someone can show me. So, I was > wondering if there's anybody in Columbus who can meet 1-2 times and explain > and show hash of hashes to me? If there are any classes locally taught, > that'll work as well. > > thanks, > -- > Alper > Post-doctoral Researcher > Plant Biotechnology Center > The Ohio State University > 1060 Carmack Rd > Columbus, OH 43210 > _______________________________________________ > Columbus-pm mailing list > http://columbus.pm.org/ > Columbus-pm at pm.org > http://mail.pm.org/mailman/listinfo/columbus-pm From derekbellnersmith at yahoo.com Sat Sep 27 07:44:38 2008 From: derekbellnersmith at yahoo.com (Derek B. Smith) Date: Sat, 27 Sep 2008 07:44:38 -0700 (PDT) Subject: [Columbus-pm] hash of hashes Message-ID: <838543.32841.qm@web38404.mail.mud.yahoo.com> Chuck, Wow could you share these notes in electronic fomat? At times I have issues grasping these data structures. BTW, will columbus.pm hold a Perl workshop in the spring? I read this on PPW's website. I went last year but cannot go this year...scheduling conflicts. thank you ----- Original Message ---- From: Chuck Day To: Alper Yilmaz Cc: columbus-pm at pm.org Sent: Saturday, September 27, 2008 8:08:37 AM Subject: Re: [Columbus-pm] hash of hashes Alper, Hashes might be my favorite use of perl. Especially hashes of hashes and hashes of arrays. I have about 10 pages of notes on these and would be happy to meet you over coffee anytime. Just give me a ring at 614-598-5559. Chuck > Hi Columbus Perl Mongers, > > I'm the webmaster of www.grassius.org , the site is developed with Perl by > HTML::Mason. I also used Bio::Perl modules in addition to pure Perl. > However, my background is in biology and I learned/used Perl within a year. > I'm having trouble with complex data structures such as hash of hashes. Even > though I read tutorials or manuals I'm not getting it, since I learn > visually. I think I'll learn faster if someone can show me. So, I was > wondering if there's anybody in Columbus who can meet 1-2 times and explain > and show hash of hashes to me? If there are any classes locally taught, > that'll work as well. > > thanks, > -- > Alper > Post-doctoral Researcher > Plant Biotechnology Center > The Ohio State University > 1060 Carmack Rd > Columbus, OH 43210 > _______________________________________________ > Columbus-pm mailing list > http://columbus.pm.org/ > Columbus-pm at pm.org > http://mail.pm.org/mailman/listinfo/columbus-pm _______________________________________________ Columbus-pm mailing list http://columbus.pm.org/ Columbus-pm at pm.org http://mail.pm.org/mailman/listinfo/columbus-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From jalex at pobox.com Sun Sep 28 18:02:04 2008 From: jalex at pobox.com (Jason) Date: Sun, 28 Sep 2008 21:02:04 -0400 Subject: [Columbus-pm] Fwd: [pm_groups] Pittsburgh Perl Workshop Oct 11-12, 2008 In-Reply-To: <5A23F48F-2F84-40CF-A986-99DD5CFFE43F@robertblackwell.com> References: <5A23F48F-2F84-40CF-A986-99DD5CFFE43F@robertblackwell.com> Message-ID: <8d5e76f20809281802w40f42d3br60d017e979aadd11@mail.gmail.com> ...and the price - http://pghpw.org/ppw2008/costs.html ---------- Forwarded message ---------- From: Robert Blackwell Date: Sat, Sep 27, 2008 at 10:26 PM Subject: [pm_groups] Pittsburgh Perl Workshop Oct 11-12, 2008 To: pm_groups at pm.org Please forward this to your local Perl Monger group and anywhere you think might find people that would be interested. Thanks Robert Blackwell The Pittsburgh Perl Workshop is a low-cost technical conference held at the Carnegie Mellon University's Oakland Campus. The workshop will be held on October 11?12 2008. * Classes This year we are offering three great classes: Dan Klein is back teaching From Zero to Perl. http://pghpw.org/ppw2008/zerotoperl.html Peter Scott - Maintaining Code While Staying Sane http://pghpw.org/ppw2008/maintainingcode.html brian d foy - Mastering Perl http://pghpw.org/ppw2008/masteringperl.html * Great Talks The schedule can be found here http://pghpw.org/ppw2008/schedule. * Hack-a-thons We are having Pagtrick Michaud lead a Rakudo, (Perl 6) hack-a-thon. * Bug Labs Bug Labs, http://buglabs.net will be giving a talk and having a hands on demo of their hardware. We will also be giving details about a development grant for someone wanting to develop something with perl with Bug Labs hardware. * GPU/CUDA Have you been hearing about coding with your Graphics Card? Well if not you will soon. We are having a talk about coding with the GPU and a lab using Nvida's Cuda technology. http://www.nvidia.com/object/cuda_home.html * Community Come see old perl friends and make some new ones. We will have plenty of social activities at night. -- 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 -- Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chuck.Day at s1te.com Mon Sep 29 07:08:45 2008 From: Chuck.Day at s1te.com (Chuck Day) Date: Mon, 29 Sep 2008 10:08:45 -0400 (EDT) Subject: [Columbus-pm] hash of hashes In-Reply-To: <838543.32841.qm@web38404.mail.mud.yahoo.com> References: <838543.32841.qm@web38404.mail.mud.yahoo.com> Message-ID: <2434.75.118.24.175.1222697325.squirrel@WWW.S1TE.COM> This is a forum. We can start here with the basic anonymous hash: $list = { key1 => value1, key2 => value2, key3 => value3 }; This is known as %list. You can add to this: $list{key4} = value4; You can print these: print $list{key4}; Loop through them: for $key (keys %{ $list } ) { do something; } I prefer to put the keys into an array though because you can sort these better: @keys = sort(keys %list); foreach (@keys) { do something; } Sorting it differently: @keys = sort { $list{$b} cmp $list{$a} } (keys %list); @keys = sort { $list{$b} <=> $list{$a} } (keys %list); > Chuck, > > Wow could you share these notes in electronic fomat? At times I have issues grasping > these data structures. > BTW, will columbus.pm hold a Perl workshop in the spring? I read this on PPW's > website. I went last year but cannot go this year...scheduling conflicts. > > > thank you > From smithde at oclc.org Mon Sep 29 08:04:16 2008 From: smithde at oclc.org (Smith,Devon) Date: Mon, 29 Sep 2008 11:04:16 -0400 Subject: [Columbus-pm] hash of hashes In-Reply-To: <2434.75.118.24.175.1222697325.squirrel@WWW.S1TE.COM> References: <838543.32841.qm@web38404.mail.mud.yahoo.com> <2434.75.118.24.175.1222697325.squirrel@WWW.S1TE.COM> Message-ID: You need to be more careful about the difference between a hash and a hash reference. You sorta get them mixed up in your examples. #Hash: %list = ( list1 => 'value1', list2 => 'value2', list3 => 'value3' ); #Hash Ref: $list_ref = { ref1 => 'value1', ref2 => 'value2', ref3 => 'value3' }; #Hash: $list{list4} = 'value4'; #Hash Ref: $list_ref->{ref4} = 'value4'; #Hash: for $key (keys %list ) { print "$key\n"; } #Hash Ref: for $key (keys %{ $list_ref } ) { print "$key\n"; } -----Original Message----- From: columbus-pm-bounces+smithde=oclc.org at pm.org [mailto:columbus-pm-bounces+smithde=oclc.org at pm.org] On Behalf Of Chuck Day Sent: Monday, September 29, 2008 10:09 AM To: Derek B. Smith Cc: columbus-pm at pm.org Subject: Re: [Columbus-pm] hash of hashes This is a forum. We can start here with the basic anonymous hash: $list = { key1 => value1, key2 => value2, key3 => value3 }; This is known as %list. You can add to this: $list{key4} = value4; You can print these: print $list{key4}; Loop through them: for $key (keys %{ $list } ) { do something; } I prefer to put the keys into an array though because you can sort these better: @keys = sort(keys %list); foreach (@keys) { do something; } Sorting it differently: @keys = sort { $list{$b} cmp $list{$a} } (keys %list); @keys = sort { $list{$b} <=> $list{$a} } (keys %list); > Chuck, > > Wow could you share these notes in electronic fomat? At times I have > issues grasping these data structures. > BTW, will columbus.pm hold a Perl workshop in the spring? I read this > on PPW's website. I went last year but cannot go this year...scheduling conflicts. > > > thank you > _______________________________________________ Columbus-pm mailing list http://columbus.pm.org/ Columbus-pm at pm.org http://mail.pm.org/mailman/listinfo/columbus-pm From Chuck.Day at s1te.com Mon Sep 29 07:54:09 2008 From: Chuck.Day at s1te.com (Chuck Day) Date: Mon, 29 Sep 2008 10:54:09 -0400 (EDT) Subject: [Columbus-pm] hash of hashes In-Reply-To: References: <838543.32841.qm@web38404.mail.mud.yahoo.com> <2434.75.118.24.175.1222697325.squirrel@WWW.S1TE.COM> Message-ID: <2497.75.118.24.175.1222700049.squirrel@WWW.S1TE.COM> Excellent Devon. Every time I get into these I have to create a test script to get them to work. It's confusing because the -> can be assumed in with the reference array but not assumed for the reference: $list_ref = { ref1 => [value1,value2] }; These both are equal: print "$list_ref->{ref1}->[1]\n"; print "$list_ref->{ref1}[1]\n"; But this is not permitted because then it's just a hash. Makes sense! print "$list_ref{ref1}->[1]\n"; > You need to be more careful about the difference between a hash and a > hash reference. You sorta get them mixed up in your examples. > > #Hash: > %list = ( list1 => 'value1', > list2 => 'value2', > list3 => 'value3' ); > > #Hash Ref: > $list_ref = { > ref1 => 'value1', > ref2 => 'value2', > ref3 => 'value3' > }; > > > #Hash: > $list{list4} = 'value4'; > > #Hash Ref: > $list_ref->{ref4} = 'value4'; > > #Hash: > for $key (keys %list ) { > print "$key\n"; > } > > #Hash Ref: > for $key (keys %{ $list_ref } ) { > print "$key\n"; > } > > > -----Original Message----- > From: columbus-pm-bounces+smithde=oclc.org at pm.org > [mailto:columbus-pm-bounces+smithde=oclc.org at pm.org] On Behalf Of Chuck > Day > Sent: Monday, September 29, 2008 10:09 AM > To: Derek B. Smith > Cc: columbus-pm at pm.org > Subject: Re: [Columbus-pm] hash of hashes > > This is a forum. We can start here with the basic anonymous hash: > > $list = { key1 => value1, > key2 => value2, > key3 => value3 }; > > > > This is known as %list. > > > > You can add to this: > > $list{key4} = value4; > > > > > You can print these: > > print $list{key4}; > > > > > Loop through them: > > for $key (keys %{ $list } ) > { > do something; > } > > > > > I prefer to put the keys into an array though because you can sort these > better: > > @keys = sort(keys %list); > foreach (@keys) > { > do something; > } > > > > Sorting it differently: > > @keys = sort { $list{$b} cmp $list{$a} } (keys %list); @keys = sort { > $list{$b} <=> $list{$a} } (keys %list); > > > > > >> Chuck, >> >> Wow could you share these notes in electronic fomat? At times I have >> issues grasping these data structures. >> BTW, will columbus.pm hold a Perl workshop in the spring? I read this >> on PPW's website. I went last year but cannot go this > year...scheduling conflicts. >> >> >> thank you >> > > > _______________________________________________ > Columbus-pm mailing list > http://columbus.pm.org/ > Columbus-pm at pm.org > http://mail.pm.org/mailman/listinfo/columbus-pm > > >