in reply to regex negative numbers
while (<>) { print if /^(-?\d+)\s+(-?\d+)/; print $_ for ($1..$2); } [download]