@{$listref} = grep {exists} @{$listref};
update: typo
In reply to Re^4: delete array element from array ref by tinita in thread delete array element from array ref by llancet