It looks like 'use workbook...' was a poor chose of words. You still
managed to get what I meant.
As for the error: You might try replacing your inner most loop with the
following:
foreach (@Fld) {
s/\s+$// # Strip white space from the end.
if ( $_ ) {
Thanks so much for the reply. Here's what I did to change my script, after
reading your suggestion and the perldoc for set_column. Col 1 is the date
column. Still not working... See "NEW":
my @lines =`ls -1 $tc2000`;
print @lines;
foreach $file (@lines) {
chomp($file);
print "$file...\n";
use $workbook->addformat() to setup the format. Then
$worksheet->set_column() to apply it to the spreadsheet.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary
Nielson
Sent: Saturday, May 08, 2004 4:36 PM
To: 'Gary Nielson'; [EMAIL PROTECTED]
Subject
Here's an update... I have been playing around with the spreadsheet
converted by Spreadsheet::WriteExcel from an ASCII tab-delimited file. The
first column is a date, yet I notice when checking cell formatting that it
is in general format. I think this is my problem, but I do not know how to
dictat
lino_iozzo wrote:
Hello,
On unix the first line of my perl code is:
#!/usr/bin/perl -w
what should it be when using on activeperl.
Thanks,
Lino
___
ActivePerl mailing list
In your first block of code you are modifiying the element of the array which is what you expect I believe. In your second block of code you are modifiying a new variable set at first equal to the value of the array element and then modified using the substition. The modification is not touching th
Your confusion lies in the substitution happening in these two for loops
#Loop 1
foreach my $l (@ar) {
$l =~ s/Fred/Thomas/;
}
In this loop you are assigning a local (my) variable $l to each element of
@ar and substituting on that local which immediately goes out of scope.
#Loop 2
for( m
>From Programming Perl, 3d ed, Section 4.4.3:
If LIST consists entirely of assignable values (meaning variables,
generally, not enumerated constants), you can modify each of those
variables by modifying VAR inside the loop. That's because the foreach
loop index variable is an implicit alias for ea
It depends some on the version of Windows you are running. On my WinXP
all I have to do is select one of my .pl files, right click, and select
properties. On the first tab (General) is a open to set "Opens with".
Use that to associate the Perl executable with any .pl file. On other
versions you
Hi,
I thought I know a bit of perl but this is confusing ...
=== cut 1 ===
#! /usr/bin/perl
use strict;
my @ar = ();
push @ar,"Harry Fred Paul";
push @ar,"Fred Ringo John";
push @ar,"Georg Don Fred";
foreach my $l (@ar) {
$l =~ s/Fred/Thomas/;
}
t();
sub t {
for(my $z=0;$z<@ar;$z
Try adding 'use warnings;' to your program. See "Programming Perl," 3d
ed, section 31.22.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
lino_iozzo
Sent: Saturday, May 08, 2004 10:52 AM
To: [EMAIL PROTECTED]
Subject: the first line of my perl code
Hell
Hello,
Currently I have to
type the following at the command prompt:
perl parse.pl test.csv (parse.pl take one argument..the file to
parse)
If I
type just parse.pl test.csv the file parse.pl open in
notepad.
what is
happening here and how do I eliminate having to type "perl" before
Hello,
On unix the first
line of my perl code is:
#!/usr/bin/perl
-w
what should it be
when using on activeperl.
Thanks,
Lino
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
I am using Spreadsheet::WriteExcel to get all files in a directory and
convert them from tab-delimited text to xls format. When I import them
manually, my subsequent formula works fine. However, when I use the same
formula on the converted file, I get a #DIV/0!. I notice that in the last
cell on ea
IvorW wrote:
>
> From: "Rob Dixon" <[EMAIL PROTECTED]>
> To: "Sui Ming Louie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: 08 May 2004 11:07
> Subject: Re: Function to Add Two Arrays
>
> > Change this to
> >
> > print "@array_sum\n";
> >
> > to separate elements with spaces.
>
> You need
- Original Message -
From: "Rob Dixon" <[EMAIL PROTECTED]>
To: "Sui Ming Louie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 08 May 2004 11:07
Subject: Re: Function to Add Two Arrays
>
> Hi.
>
> See my answer in-line.
>
> Sui Ming Louie wrote:
> >
>
> > I am trying write a function
16 matches
Mail list logo