Re: Formatting lists of integers

2003-03-25 Thread Alex / Kilinrax
On Mon, Mar 24, 2003 at 02:09PM, Kate L Pugh wrote: Hello, quick question. Is there a module that will turn eg the list 1,2,3,4,6,7,9,20 into the string 1-4, 6-7, 9, 20 (or something similar)? A golf-ish solution: krait:~# perl -l -Mstrict -w -e 'sub n{$_=join q[,],[EMAIL

Formatting lists of integers

2003-03-24 Thread Kate L Pugh
Hello, quick question. Is there a module that will turn eg the list 1,2,3,4,6,7,9,20 into the string 1-4, 6-7, 9, 20 (or something similar)? Kake

Re: Formatting lists of integers

2003-03-24 Thread Mark Fowler
On Mon, 24 Mar 2003, Kate L Pugh wrote: Hello, quick question. Is there a module that will turn eg the list 1,2,3,4,6,7,9,20 into the string 1-4, 6-7, 9, 20 (or something similar)? This was a Perl Quiz Of The Week question (week #6)

Re: Formatting lists of integers

2003-03-24 Thread Kate L Pugh
On Mon, 24 Mar 2003, Kate L Pugh wrote: Hello, quick question. Is there a module that will turn eg the list 1,2,3,4,6,7,9,20 into the string 1-4, 6-7, 9, 20 (or something similar)? On Mon 24 Mar 2003, Mark Fowler [EMAIL PROTECTED] wrote: This was a Perl Quiz Of The Week question (week #6)

Re: Formatting lists of integers

2003-03-24 Thread Chris Ball
On Mon, 24 Mar 2003 14:09:15, Kate L Pugh [EMAIL PROTECTED] said: Is there a module that will turn eg the list 1,2,3,4,6,7,9,20 into the string 1-4, 6-7, 9, 20 (or something similar)? I ended up writing a script to do this a few years ago, after looking at obvious places for it to be