sub step { my $step = shift; return grep {($_ - $_[0]) % $step == 0} @_ } foreach (step 5, 2 .. 100) { print "$_ " }