As the other replies said, they start with [0].
for you #1 question, you can define the number of elements explicitly by doing
$#array = number. But I don't know if there is any maximum
=====
use strict;
my @array=(1,2,3,4,5,6,7);
$#array=10;
my $nb=@array;
print "Number of elements in the table: $nb\n";
print "Highest index of the table: $#array\n";
print "Elements in the table:\n\n";
foreach(@array) {
print "$_ ";
print "Undefined element" unless defined $_;
}
this will return:
Number of elements in the table: 11
Highest index of the table: 10
Elements in the table:
1
2
3
4
5
6
7
Undefined element
Undefined element
Undefined element
Undefined element
=====
Hope this helps
Etienne
Brian wrote:
> #1 How can I tell the upper boundary limit of the array (IE, Max Entries)
>
> #2 if I have an array: @item ... how can I see just the 5th element?
> something like: print @item[5]; ?? Would that work?
>
> Any assistance would be fantasic ... also, if that does work, does Perl
> start with 0 or with 1 as the base element?
>
> Thanks a bunch!
>
> Brian
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
S/MIME Cryptographic Signature