On Tue, 28 Oct 2003 11:53:44 -0700, Wiggins d Anconia wrote:
> or if you know the length of the array ahead of time:
>
> my @rows = ('','','');
I prefer the following instead:
my @rows = ('') x 3;
Easier to read...?
--
Tore Aursand <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: [EMAIL P
<[EMAIL PROTECTED]> wrote:
>
> How Do I initialize an empty array so thtat I don't get an unitiialized
> error?
>
> ...
> my @rows;
>
> I thought I could do something like @rows = new (); but it's not working.
You don't.
my @rows;
declares an array, which is initially empty. If you put
somethi
thanks. it works.
@rows=();
--
>
>
>> How Do I initialize an empty array so thtat I don't get an unitiialized
>> error?
>>
>> ...
>> my @rows;
>>
>> I thought I could do something like @rows = new (); but it's not
>> working.
>>
>
> Drop the 'new':
>
> my @rows = ();
>
> http://danconia.org
>
>
>
> > How Do I initialize an empty array so thtat I don't get an unitiialized
> > error?
> >
> > ...
> > my @rows;
> >
> > I thought I could do something like @rows = new (); but it's not
working.
> >
>
> Drop the 'new':
>
> my @rows = ();
>
Are you sure you are getting the warning on
> How Do I initialize an empty array so thtat I don't get an unitiialized
> error?
>
> ...
> my @rows;
>
> I thought I could do something like @rows = new (); but it's not working.
>
Drop the 'new':
my @rows = ();
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi