http://www.perlmonks.org?node_id=1019600


in reply to Printing the range

Or Set::IntSpan