programming-examples/perl/SystemFunction/Using scalar function to convert array to scalar variable.pl
2019-11-15 12:59:38 +01:00

8 lines
152 B
Perl

#!/usr/bin/perl -w
use strict;
my @array = qw(A B C D);
print "Scalar value : ", scalar(@array), "\n";
print "Highest index: ", $#array, "\n";