#!/usr/bin/perl use 5.014; use warnings FATAL => qw(all); use strict; use Data::Dump qw(dump pp); # 9913950PB my $wheel = 26.5; my @chwhs = qw (11 13 15 17 19 21 24 28 32); # test data my @cogs = qw (42 32 22); # test data my $gear; for my $c(0..8) { $gear->[$c][$_] = $wheel * $chwhs[$c]/$cogs[$_] for 0..2; } pp($gear);