#!/usr/bin/env perl use warnings; use strict; my $a=0x15; for (my $i = 1; $i <= 100; $i++) { $a+=0x0C; print "$i: "; printf "0x%x\n", $a; }