Re: Simple array question

2002-05-31 Thread Peter Scott
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

RE: Simple array question

2002-05-31 Thread Shishir K. Singh
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

RE: Simple array question

2002-05-31 Thread Shishir K. Singh
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

Re: Simple array question

2002-05-31 Thread Jeff 'japhy' Pinyan
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

Simple array question

2002-05-31 Thread Barry Jones
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

RE: simple array question

2002-05-21 Thread Dave Cross
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

Re: simple array question

2002-05-21 Thread aman cgiperl
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

RE: simple array question

2002-05-21 Thread Barry Jones
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

RE: simple array question

2002-05-21 Thread Hanson, Robert
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

simple array question

2002-05-21 Thread A Taylor
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 _