Perl arrays: array length

The tutor shows Perl’s way of finding the length of an array.

For an intro to arrays, with a Perl example, see my post here.

Finding the length of an array is done, in Perl, as follows:

$ln=@arra0;
print $ln;

will output the length of the array @arra0.

I’ll be posting another Perl array trick soon:)

Source:

McGrath, Mike. Perl in easy steps. Southam: Computer Step, 2004.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply