map may or may not be more efficient, but it's certainly shorter:
perl -le '/(\d+)$/and$t[$1]=1for<*>;map$t[$_]||print,1..$#t'
In reply to Re^3: one-line split file sequence checker
by kyle
in thread one-line split file sequence checker
by wdef2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |