Arrays

Printing all array elements at once

Example:

#!/usr/bin/perl

@measurement = (3, 2, 5, 9, 7, 13, 16);
print "Measurements: @measurement \n";
                     ____

Program output:

Measurements: 3 2 5 9 7 13 16

All array elements are printed on one line, delimited by a single space.


Table of Contents.
Previous | Next.