for my $num ($first .. $last) { # do something with $num }