in reply to Re: (Golf) Rangify Array
in thread (Golf) Rangify Array
# 27 + 40 + 2 = 69 dude! sub num2range { #234567890123456789012345678901234567890 my$x=join',',sort{$a-$b}@_; $x=~s/\b(\d+)(,((??{$++1})))+\b/$1-$+/g; $x }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: (Golf) Rangify Array
by japhy (Canon) on Sep 27, 2001 at 21:09 UTC |