in reply to Re^3: delete array element from array ref
in thread delete array element from array ref

@{$listref} = grep {exists} @{$listref};
maybe you meant:
@{$listref} = map { exists $listref->[$_] ? $listref->[$_] : () } 0 .. $#{$listref} ;
?

update: typo