http://qs321.pair.com?node_id=261930


in reply to Array: inserting what isn't there

grep hash fu!
do you have a more useful dataset to check these against?
my @array = ("12.found","1.found","2.found", "4.found", "5.found", "8. +found", "100.found"); my @e = sort {$a<=>$b} map {m/^(\d+)/ && $1}@array; my %hash; @hash{@e}= (@array); for ($e[0]..$e[-1]) {defined ($hash{$_})or$hash{$_} ="$_.missing"} print join " ", sort {$a<=>$b} values %hash;