#!/usr/bin/env perl use utf8; use Utils; use strict; use warnings; MAIN: { my $squares = [0, 1, 4, 9, 16, 25]; # Print out the squares from the list for (my $i = 0; $i < scalar(@{$squares}); ++$i) { print Utils::messageFormat("\{0:d\}^2 = \{1:d\}", $i, $squares->[$i]), "\n"; } }