http://qs1969.pair.com?node_id=388321


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), $/;