Fixed. The replies to my request indicated that I was using a hash { } instead of an
array [ ] like I needed.
What a dumb mistake!
Thanks for all your help!
Craig
>>> "Craig Sharp" <[EMAIL PROTECTED]> 03/05/02 11:32AM >>>
I am having a problem with the following script:
#!/usr/bin/perl -w
I've included the fixes below.
But basically when you refer to $date{index}
you are really talking about the hashkey 'index' of hash '%date'.
So at the beginning you should declare your hashes, you declared them as
strings.
e.g.
my %date; # this is a hash
not
my $date; # this is a string
#%
Try defining your hashes like you did with the variables.
actually.. it looks like you defined scalar variables and not hashes
it should be
my %date; #not my $date
my %time; # not my $time
Hope this helps!
-Ope Bakare
"Craig Sharp" <[EMAIL PROTECTED]> on 03/05/2002 11:32:02 AM
I am having a problem with the following script:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new("unixsvrs.xls");
my $worksheet = $workbook->addworksheet();
my @date;
my @time;
my @device;
my @address;
my @count;
my $index;
my $data;
my
Dave and Phil,
Both of your solutions worked just great. Thanks for your assitance.
Craig
>>> Philip Andrew <[EMAIL PROTECTED]> 03/04/02 04:23PM >>>
Craig Sharp wrote:
>I am trying to parse a file with the following script:
>
>. . . .
>
>1. Look at the sample file that is being used fo