Re: help with Spreadsheet::WriteExcel please

2012-06-05 Thread Brock
On 2012.06.05.17.19, Ken Furff wrote: > for my $row (1..$row_max){ > ... > $worksheet->write ($row+1, 0, "$valA"); > $worksheet->write ($row+1, 1, "$valB"); > ... > for some reason it puts the values in the new worksheet on the row > that it finds them on in the original. So the spreadsheet

Re: lexical scope

2012-06-05 Thread John W. Krahn
Chris Stinemetz wrote: Why does this short program only seem to capture the last line of input in the @array, but when I put the for loop inside the while loop all lines of input are available in @array. I thought by declaring the @array outside the while loop would make all of its contents avai

Re: lexical scope

2012-06-05 Thread Shawn H Corey
On 12-06-05 08:31 PM, Steve Bertrand wrote: On 05/06/2012 3:49 PM, Shawn H Corey wrote: On 12-06-05 05:43 PM, Bill Stephenson wrote: Maybe this is what you need? #!/usr/bin/perl use warnings; use strict; my @array; while ( my $line = ) { chomp $line; push (@array = split(/\s+/, $line,-1));

Re: lexical scope

2012-06-05 Thread Steve Bertrand
On 05/06/2012 6:31 PM, Steve Bertrand wrote: On 05/06/2012 3:49 PM, Shawn H Corey wrote: On 12-06-05 05:43 PM, Bill Stephenson wrote: Maybe this is what you need? #!/usr/bin/perl use warnings; use strict; my @array; while ( my $line = ) { chomp $line; push (@array = split(/\s+/, $line,-1));

Re: lexical scope

2012-06-05 Thread Steve Bertrand
On 05/06/2012 3:49 PM, Shawn H Corey wrote: On 12-06-05 05:43 PM, Bill Stephenson wrote: Maybe this is what you need? #!/usr/bin/perl use warnings; use strict; my @array; while ( my $line = ) { chomp $line; push (@array = split(/\s+/, $line,-1)); push @array, [ split /\s+/, $line, -1 ]; I

help with Spreadsheet::WriteExcel please

2012-06-05 Thread Ken Furff
I am using Spreadsheet::WriteExcel to create a spreadsheet with two columns in it. It works. I have one final little problem. here's the code #!/usr/bin/perl use strict; use Spreadsheet::XLSX; use SpreadSheet::WriteExcel; my $excel = Spreadsheet::XLSX -> new ('build.xlsx'); my $sheet = $excel->

Re: lexical scope

2012-06-05 Thread Shawn H Corey
On 12-06-05 05:43 PM, Bill Stephenson wrote: Maybe this is what you need? #!/usr/bin/perl use warnings; use strict; my @array; while ( my $line = ) { chomp $line; push (@array = split(/\s+/, $line,-1)); push @array, [ split /\s+/, $line, -1 ]; } for my $item ( @array ) { print $i

Re: lexical scope

2012-06-05 Thread Bill Stephenson
Maybe this is what you need? #!/usr/bin/perl use warnings; use strict; my @array; while ( my $line = ) { chomp $line; push (@array = split(/\s+/, $line,-1)); } for my $item ( @array ) { print $item,"\n"; } Kindest Regards, Bill Stephenson On Jun 5, 2012, at 4:15 PM, Chris Stinemetz wr

Re: lexical scope

2012-06-05 Thread Robert Wohlfarth
On Tue, Jun 5, 2012 at 4:15 PM, Chris Stinemetz wrote: > Why does this short program only seem to capture the last line of > input in the @array, but when I put the for loop inside the while loop > all lines of input are available in @array. > > while ( my $line = ) { > chomp $line; > @array

Re: moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?

2012-06-05 Thread Rajeev Prasad
thx Shawn,   I guess, it would not check which modules have newer versions available, and will install the same modules whihc were there in old PC.   I install only those modules which come thru ubuntu, so that (I assume) there is some compatibility testing already done. (anD) it does not break a

lexical scope

2012-06-05 Thread Chris Stinemetz
Why does this short program only seem to capture the last line of input in the @array, but when I put the for loop inside the while loop all lines of input are available in @array. I thought by declaring the @array outside the while loop would make all of its contents available once all the lines

Re: moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?

2012-06-05 Thread Shawn H Corey
On 12-06-05 04:00 PM, Rajeev Prasad wrote: for e.g. on 10.10: perl ver is: v5.10 on 12.04 it is: perl (5.14.2-6ubuntu2) is there a quick method to do that? No, but you can adapt this algorithm: http://onionstand.blogspot.ca/2012/05/moving-modules-across-perlbrew.html Use this command to cre

moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?

2012-06-05 Thread Rajeev Prasad
Hello,   I am going to move (not upgrade) from my current ubuntu ver 10.10  to ver. 12.04 (fresh install). I will restore my data and scripts there and have them ready.   But, how do i have all the required modules (which i have installed on my current PC over months) installed on target system?

Re: refine the code

2012-06-05 Thread Shlomi Fish
Hi Lina, On Tue, 5 Jun 2012 16:03:52 +0800 lina wrote: > Hi, > > I wrote one, but don't know make it mature. > Overall, your program is OK, but see below for my nitpicks. > Here is what I am going to do. > > "43 43 40 1", > "A c #FF " /* "0" */, > "B c #F8F8F8 " /* "0.0385" */, > "C

Re: mod_perl for n00bs

2012-06-05 Thread Bill Stephenson
On Jun 5, 2012, at 7:37 AM, Mark Haney wrote: > > Honestly, it's really not even that complicated. I've been hearing that > using CGI.pm is 'outdated', 'uncool', whatever you want to call it. And > generally speaking the statement after that is about mod_perl. > > My entire reason behind aski

Re: subroutine returning data

2012-06-05 Thread John W. Krahn
[ Please do not top-post your replies. Please remove non-relevant text from your reply before posting. TIA ] Jack Maney wrote: ProTip: The top two results from Google state: PROTIP | Know Your Meme About PROTIP is a term often used in forums and comments to preface snarky, obvious, count

List behavior pro tips (was: Re: subroutine returning data)

2012-06-05 Thread John SJ Anderson
Even more pro tips: * Let the list moderator (ahem, that would be me) deal with policing the behavior of the list participants. * Realize that this list is publicly archived and indexed by search engines. Realize that potential employers often Google applicants. Realize your behavior here,

RE: subroutine returning data

2012-06-05 Thread Jack Maney
ProTip: If you're going to ask for help, don't insult and dismiss out of hand the findings of those who take the time to help you. -Original Message- From: John W. Krahn [mailto:jwkr...@shaw.ca] Sent: Tuesday, June 05, 2012 2:18 AM To: Perl Beginners Subject: Re: subroutine returning dat

Re: mod_perl for n00bs

2012-06-05 Thread 'lesleyb'
On Tue, Jun 05, 2012 at 08:37:33AM -0400, Mark Haney wrote: > On 06/04/2012 09:25 PM, pangj wrote: > > > >>I want to understand why Mark thinks he needs mod_perl. If it's just > >>because he wants to speed up his app (soup up the engine) there might > >>be things he can do that don't require rewrit

Re: mod_perl for n00bs

2012-06-05 Thread Mark Haney
On 06/04/2012 09:25 PM, pangj wrote: I want to understand why Mark thinks he needs mod_perl. If it's just because he wants to speed up his app (soup up the engine) there might be things he can do that don't require rewriting a lot of code, or spending a lot of time learning a lot of new ways of

refine the code

2012-06-05 Thread lina
Hi, I wrote one, but don't know make it mature. Here is what I am going to do. "43 43 40 1", "A c #FF " /* "0" */, "B c #F8F8F8 " /* "0.0385" */, "C c #F2F2F2 " /* "0.0769" */, "D c #EBEBEB " /* "0.115" */, "E c #E5E5E5 " /* "0.154" */, "F c #DEDEDE " /* "0.192" */, "G c #D8D8D8 " /

Re: subroutine returning data

2012-06-05 Thread John W. Krahn
Shlomi Fish wrote: On Mon, 04 Jun 2012 14:19:27 -0700 "John W. Krahn" wrote: Chris Stinemetz wrote: I have a subroutine that I want to "return 1" only if the value of %{$href->{$_[0]}} is equal to 'ND' for the whole 24 occurences. One way to do it: sub site_offAir { return values %{

Re: Fw: [MailServer Notification]Web Reputation Notification

2012-06-05 Thread pangj
I keep receiving these bounces due to posts I make tobeginn...@perl.org. It seems that it is a mail filter on the pearsontc.com domain (though I don't know the username there). Can this be fixed? I didn't get that bounce. Try remove the signature from your message and redeliver it to find the