in reply to deleting a non-numeric scalar within array
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 Section
Seekers of Perl Wisdom
in reply to deleting a non-numeric scalar within array
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;
|
---|