Number range to the minimum set of prefixes


#1

Hi!

May be someone need this? I made this small programm in perl to convert the range of numbers got from PSTN to the minimum set of prefixes for dialplan.

Example

cat 1234567:1239819 | ./interval2prefix
1234567
1234568
1234569
123457
123458
123459
12346
12347
12348
12349
1235
1236
1237
1238
12390
12391
12392
12393
12394
12395
12396
12397
123980
123981

Code is here: nw-wind.livejournal.com/227076.html