From chardin at valueclick.com Fri Dec 9 09:57:15 2011 From: chardin at valueclick.com (Chuck Hardin) Date: Fri, 9 Dec 2011 09:57:15 -0800 Subject: [Thousand-Oaks-pm] TO Perl Mongers on Wednesday! Message-ID: <4EE24BFB.9010304@valueclick.com> The next meeting of the Thousand Oaks Perl Mongers is this coming Wednesday, December 14, at the usual time and place. Check out these exciting presentations! http://thousand-oaks.pm.org/ ...okay, there are no presentations. Yet. Two lumps of coal in our stocking! Whose fault is that? Well, mine. I didn't announce the meeting until today. But perhaps a holiday miracle will occur, and one or two brave people will present on topics of interest to Perl programmers. Our presenters have a 92% survival rate*, and that ain't bad. Don't be shy, folks. We're a good audience, and our presentations run the gamut from highly technical and detailed to light and superficial. (The latter are my presentations). So try your hand, or if you don't want to, come on out and see what we do present. * -- During the meeting itself. Does not include figures for the Thousand Oaks Perl Curse. -- Chuck Hardin Software Engineer, ValueClick Media +1-818-575-4573 chardin at valueclick.com This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return email, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From merlyn at stonehenge.com Fri Dec 9 11:22:16 2011 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Fri, 09 Dec 2011 11:22:16 -0800 Subject: [Thousand-Oaks-pm] TO Perl Mongers on Wednesday! In-Reply-To: <4EE24BFB.9010304@valueclick.com> (Chuck Hardin's message of "Fri, 9 Dec 2011 09:57:15 -0800") References: <4EE24BFB.9010304@valueclick.com> Message-ID: <86r50dczyv.fsf@red.stonehenge.com> >>>>> "Chuck" == Chuck Hardin writes: Chuck> The next meeting of the Thousand Oaks Perl Mongers is this coming Wednesday, Chuck> December 14, at the usual time and place. Although I usually enjoy the trip up the coast, I have urgent plans for this upcoming wednesday night, and won't be attending. So, no, I can't even be called upon to give Yet Another Preso. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion From naterajj at gmail.com Mon Dec 12 11:10:30 2011 From: naterajj at gmail.com (Juan J. Natera) Date: Mon, 12 Dec 2011 11:10:30 -0800 Subject: [Thousand-Oaks-pm] SCALE X: Perl Mongers Discount Code, volunteers, etc Message-ID: Hi Folks, Again SCALE As I mentioned before, you can use coupon code PMONG to obtain 50% discount from the SCALE registration. For those interested in volunteering, please contact me off list, there is a special registration code that will waive the registration fee. Randal, if you want us to have some of your books for sale at the booth, let me know. Thanks, Juan From chardin at valueclick.com Wed Dec 14 16:39:09 2011 From: chardin at valueclick.com (Chuck Hardin) Date: Wed, 14 Dec 2011 16:39:09 -0800 Subject: [Thousand-Oaks-pm] Thousand Oaks PM cancelled this month Message-ID: <4EE941AD.10303@valueclick.com> We have no presenters, and likely very few attendees, so we're calling off TO Perl Mongers this month. See you in the New Year! -- Chuck Hardin Software Engineer, ValueClick Media +1-818-575-4573 chardin at valueclick.com This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return email, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chardin at valueclick.com Thu Dec 15 16:43:52 2011 From: chardin at valueclick.com (Chuck Hardin) Date: Thu, 15 Dec 2011 16:43:52 -0800 Subject: [Thousand-Oaks-pm] Fwd: RE: Thousand Oaks PM cancelled this month In-Reply-To: <995C029A48947048B3280035B3B5433C010D40E6@Stellar2k3-Exch.STELLARMICRO.LOCAL> References: <995C029A48947048B3280035B3B5433C010D40E6@Stellar2k3-Exch.STELLARMICRO.LOCAL> Message-ID: <4EEA9448.1090203@valueclick.com> Forwarded because I don't believe it went to the list. -------- Original Message -------- Subject: RE: [Thousand-Oaks-pm] Thousand Oaks PM cancelled this month Date: Thu, 15 Dec 2011 15:05:54 -0800 From: Barry Brevik To: Chuck Hardin , ThousandOaks.pm Of course I failed to notice this email, so like an idiot, I showed up at ValueClick last night. Since I missed out, I thought I would share this very short snippet with you. I have to deal with many Excel files and CSV files, so I have code that reads each line into an array to be processed. The problem is that my users keep jacking around the column order before giving me the final file. I decided to fix that by reading row 0 (or, to my great annoyance, row 1 in Excel-speak), which in my case always contains column headers, look for the column names I need and extract the array offset to use in extracting data from subsequent rows. There is, of course, more than 1 way to do this, but to keep it simple, this is the way I do it. One gotcha is if your array contains any duplicate values, you are screwed. My apologies if this code is too elementary for the list members: use warnings; use strict; # Array represents columns read from a CSV file. # Or whatever you want. my @array = ('zero', 'one', 'two', 'three', 'four'); # Create hash where the keys are the values from the # array, and the values are the positions in the array. my $i = 0; my %hash = map {$array[$_] => $i++} (0..$#array); # Display the results. print "$_, $hash{$_}\n" foreach (keys(%hash)); -- Chuck Hardin Software Engineer, ValueClick Media +1-818-575-4573 chardin at valueclick.com This email and any files included with it may contain privileged, proprietary and/or confidential information that is for the sole use of the intended recipient(s). Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender. If you have received this email in error, please immediately notify the sender via return email, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: