#!/usr/bin/env perl use utf8; use Utils; use strict; use warnings; sub squared { my ($j) = @_; return $j * $j; } MAIN: { binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); binmode(STDIN, ":utf8"); for (my $i = 1; $i <= 10; ++$i) { print Utils::messageFormat("\{0:d\}^2 = \{1:d\}", $i, squared($i)), "\n"; } }