viktor has asked for the wisdom of the Perl Monks concerning the following question:
Hi, Can anyone tell me that if we have any module in cpan which can split the array elements in blocks of say 10. For example
@array=qw ( 1 2 3 10 11 12 13 20 21);I want the output like this 1-10 5, 11-20 4, 20-30 1 thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split the array elements in ranges
by hdb (Monsignor) on Apr 16, 2013 at 10:17 UTC | |
by viktor (Acolyte) on Apr 16, 2013 at 12:24 UTC | |
|
Re: Split the array elements in ranges
by prashantktyagi (Scribe) on Apr 16, 2013 at 10:13 UTC | |
|
Re: Split the array elements in ranges
by jwkrahn (Abbot) on Apr 16, 2013 at 18:47 UTC |