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