Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: combine arrays, duh!

by dasgar (Priest)
on Apr 19, 2011 at 21:04 UTC ( [id://900223]=note: print w/replies, xml ) Need Help??


in reply to combine arrays, duh!

Haven't tested it, but I believe that the code below will should strip out all of the "unwanted" characters in an array. ("Unwanted" as in non-alphanumeric, which is what I believe that you're asking for.)

foreach my $item (@array) { $item =~ s/\W//g; # Remove non-word characters $item =~ s/_//g; # Remove all underscores }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://900223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found