in reply to Finding missing numbers in a list
You can do it with the .. operator:
@a = (41888, 41889, 41890, 41892, 41895); @m = map $a[$_-1]+1..$a[$_]-1, 1..@a-1; print join(" ", @m), $/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Finding missing numbers in a list
by Aristotle (Chancellor) on Sep 03, 2004 at 16:01 UTC | |
by davorg (Chancellor) on Sep 02, 2016 at 10:01 UTC | |
by Anonymous Monk on Sep 02, 2016 at 11:13 UTC |
In Section
Seekers of Perl Wisdom