#!/usr/bin/perl -w

use feature 'say';

print "Enter starting number: ";
$start = <>;

print "Enter ending number: ";
$end = <>;

print "Enter increment: ";
$incr = <>;

if ($start >= $end || $incr < 1) {
    die ("The starting number must be less than the ending number\n",
    "and the increment must be greater than zero.\n");
    }

foreach ($count = $start+0; $count <= $end; $count += $incr) {
    say "$count";
    }
