Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: deleting a non-numeric scalar within array

by Generoso (Parson)
on Dec 02, 2010 at 21:16 UTC ( #875007=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://875007]
help
Chatterbox?
[msh210]: I think I just found a lie in perldoc.
[msh210]: warn: "If the last element of LIST does not end in a newline, it appends the same file/line number text as die does."

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-04-24 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (439 votes). Check out past polls.