Have you tested tried the grep function and instead of looking for the ones to delete look for the ones to keep?
@hosts = grep !/($ARGV[0])/,@hosts;In reply to Re: deleting a non-numeric scalar within array
by Generoso
in thread deleting a non-numeric scalar within array
by pipeops
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |