At 11:17 AM 5/31/02 -0400, Barry Jones wrote:
>What type of functions are built in to perl for arrays?
>
>Mainly, I'm looking to find out how to see how many elements are in an
>array without counting them, but I was wondering about others too.
>
>What about hashes?
perldoc perlfunc lists them un
oops $#array is the index index of the last element
-Original Message-
From: Shishir K. Singh
Sent: Friday, May 31, 2002 11:23 AM
To: Barry Jones; Beginners @ Perl (E-mail)
Subject: RE: Simple array question
No of elements in an array is given by $#ARRAY_NAME
eg the number of
No of elements in an array is given by $#ARRAY_NAME
eg the number of element in an array @array is $#array
-Original Message-
From: Barry Jones [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 11:17 AM
To: Beginners @ Perl (E-mail)
Subject: Simple array question
What type of
On May 31, Barry Jones said:
>What type of functions are built in to perl for arrays?
>
>Mainly, I'm looking to find out how to see how many elements are in an
>array without counting them, but I was wondering about others too.
Arrays have push(), pop(), shift(), unshift(), and splice(). To get
What type of functions are built in to perl for arrays?
Mainly, I'm looking to find out how to see how many elements are in an
array without counting them, but I was wondering about others too.
What about hashes?
Barry Jones
DATABUILT, Inc. The Global AEC Information Company
1476 Fording Island
On Tue, 21 May 2002 15:17:03 +0100, Barry Jones wrote:
> Yes but you have to write it like this:
>
> (@main) = (@data1,@data2,@data3);
No you don't.
@main = (@data1,@data2,@data3);
works just fine.
Dave...
--
Shoot some of those missiles, think of us as fatherless scum
It won't be for
lor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 9:05 AM
Subject: simple array question
> Hi all,
> I have a very simple and probably stupid question to ask.
> If I have a set of arrays, @data1, @data2, @data3 etc, can I join them all
> toget
Yes but you have to write it like this:
(@main) = (@data1,@data2,@data3);
-Original Message-
From: A Taylor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 10:05 AM
To: [EMAIL PROTECTED]
Subject: simple array question
Hi all,
I have a very simple and probably stupid question to
Sure.
@main = (@data1, @data2, @data3);
Rob
-Original Message-
From: A Taylor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 10:05 AM
To: [EMAIL PROTECTED]
Subject: simple array question
Hi all,
I have a very simple and probably stupid question to ask.
If I have a set of
Hi all,
I have a very simple and probably stupid question to ask.
If I have a set of arrays, @data1, @data2, @data3 etc, can I join them all
together to make 1 main array ie: @main = @data1 + @data2 + @data3;
Thanks in advance
Anadi
_
10 matches
Mail list logo