nandymamith has asked for the wisdom of the Perl Monks concerning the following question:
Can anybody help in getting the solution for me. Below are the INPUT and the OUTPUT elements that I am expecting is as shown below :
INPUT @array = ("1","2","3","5","6","7",9"); OUTPUT @ranges = ("1:3","5:7","9");
Please Note: Do not use any CPAN libraries to extract the OUTPUT
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Generating ranges of numbers
by Anonymous Monk on Jun 30, 2016 at 10:09 UTC | |
by nandymamith (Novice) on Jun 30, 2016 at 14:32 UTC | |
|
Re: Generating ranges of numbers
by thezip (Vicar) on Jun 30, 2016 at 18:00 UTC | |
|
Re: Generating ranges of numbers
by choroba (Cardinal) on Jun 30, 2016 at 11:24 UTC | |
|
Re: Generating ranges of numbers
by Anonymous Monk on Jun 30, 2016 at 13:43 UTC | |
|
Re: Generating ranges of numbers
by hdb (Monsignor) on Jul 01, 2016 at 08:06 UTC | |
|
Re: Generating ranges of numbers
by Marshall (Canon) on Jun 30, 2016 at 15:49 UTC | |
|
Re: Generating ranges of numbers
by Anonymous Monk on Jun 30, 2016 at 14:10 UTC | |
|
Re: Generating ranges of numbers
by Anonymous Monk on Jun 30, 2016 at 17:43 UTC |