for (@ar){ if ( !-d $_){ print "<$_> cannot be found ... removing from list\n"; $_ = ''; } }