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 the
length of an array, just do

  $size = @array;

For the functions, use perldoc (like 'perldoc -f push').

As for hashes, they've got keys(), values() and each().

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to