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


in reply to Get ranges from a list of numbers (like 1,2,3 => 1-3)

Call the method run_list, or use the object in string context.