From jacoby at csociety.ecn.purdue.edu Wed Jan 3 18:41:57 2007 From: jacoby at csociety.ecn.purdue.edu (David Jacoby) Date: Wed, 3 Jan 2007 21:41:57 -0500 (EST) Subject: [Purdue-pm] Purdue PerlMongers Meeting Message-ID: Purdue PerlMongers is having a meeting at 6pm Jan 9th, in ME 119. Mark Senn will talk on Perl 6, and on Trailing Modifiers, and I (Dave Jacoby) will present on "Perl with a Lisp", or something similar. Come one, come all! -- Dave Jacoby -- jacoby.org "After three days without programming, life becomes meaningless." The Tao of Programming From westerman at purdue.edu Tue Jan 9 07:53:54 2007 From: westerman at purdue.edu (Rick Westerman) Date: Tue, 09 Jan 2007 10:53:54 -0500 Subject: [Purdue-pm] Tonight's technical meeting is cancelled. Message-ID: <45A3BA92.6000905@purdue.edu> Tonight's Perl Mongers' technical meeting is canceled. It was too close to the start of the semester and evidently all of us didn't spend our holidays thinking, breathing and coding our presentations. :-) We will have February's technical meeting on Feb. 13th at which time Mark will continue to regal us with tales of Perl 6, Dave will Lisp away, and I will speak on ""Flying high with Condor: How to run Perl on 1000 machines at once." Among other topics. If any of you wish to present something -- it does not have to be long -- then please get hold of me or simply show up at the meeting and give your talk. Don't forget the social meeting -- 4th Tuesday of the month at the Cafe Royale. Jan 23th and Feb. 27th are the next two meetings. -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From jacoby at csociety.ecn.purdue.edu Mon Jan 22 17:48:52 2007 From: jacoby at csociety.ecn.purdue.edu (David Jacoby) Date: Mon, 22 Jan 2007 20:48:52 -0500 (EST) Subject: [Purdue-pm] Reminder Message-ID: Tuesday night is Social Meeting time! 7pm at Cafe Royal on fabulous Chauncey Hill. See you there! -- Dave Jacoby -- jacoby at csociety.org "After three days without programming, life becomes meaningless." The Tao of Programming 579 days and counting..... From pmiguel at purdue.edu Tue Jan 23 09:42:39 2007 From: pmiguel at purdue.edu (Phillip San Miguel) Date: Tue, 23 Jan 2007 12:42:39 -0500 Subject: [Purdue-pm] Reminder In-Reply-To: References: Message-ID: <45B6490F.3060103@purdue.edu> David Jacoby wrote: > Tuesday night is Social Meeting time! 7pm at Cafe Royal on > fabulous Chauncey Hill. See you there! > > I'll be there. By the way. I should probably present this at the next technical meeting, but I'll probably have forgotten it by now. Kewl way to pack a white space delimited list with a single header line containing column names: =pod For example, data looks like: Row Column spot call A 1 1 + A 1 2 + A 1 3 - A 1 4 + A 1 5 + A 1 6 - =cut #read first (header) line and parse column names my @col_names; while (<>){ #This allows the first row to set the field order @col_names = split; last; } my @array_of_hash_records #Now read all the rest of the lines while (<>){ my %record; #hash to parse fields #assign to hash slice. Column headers are keys. @record{@col_names} = split; #kewl! column names become hash keys push @array_of_hash_records, \%record #save each record to data structure } Weird things here are the "hash slice". Which I think means: @hash{'a','b','d'} is the same as ($hash{'a'},$hash{'b'},$hash{'c'}) and, instead of writing out the keys, you can just use an array: @array=('a','b','d'); @hash{@array} is the same as @hash{'a','b','d'} Phillip