perl print array index code example
Example 1: perl print array
# Perl
# syntax
print "@<array-name>";
# example
my @AgesArray = (25, 30, 40);
print "@AgesArray"; # OUTPUT: 25 30 40
Example 2: perl array
$ages[0] = 25
$ages[1] = 30
$ages[2] = 40
$names[0] = John Paul
$names[1] = Lisa
$names[2] = Kumar