aboutsummaryrefslogtreecommitdiff
path: root/challenge-042/ryan-thompson/perl/ch-1.pl
blob: 88b410aee9a829c7e051a362f3396e1338e250b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env perl
#
# ch-1.pl - Print octal numbers from 0..50
#
# Ryan Thompson <rjt@cpan.org>

# The following is a polyglot (runs in Perl and Raku):
printf "Decimal %2d = Octal %2o\n", $_, $_ for 0..50;

# This printf feature will be important for our Raku solution:
printf 'Decimal %1$2d = Octal %1$2o'."\n", $_ for 0..50;