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

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 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

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 under

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

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 aman cgiperl
Here's how you can do it (this is just one way): #!/usr/bin/perl @x = ('a','b'); @y = ('c','d'); @z = ('e','f'); @xyz = (@x,@y,@z); print @xyz; Output is : abcdef Got it!!! Aman - Original Message - From: A Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002

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