Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: array with s///g command

by Anno (Deacon)
on Jul 30, 2007 at 09:48 UTC ( [id://629509]=note: print w/replies, xml ) Need Help??


in reply to Re^2: array with s///g command
in thread array with s///g command

You can simply join the statements
my @array2 = @array1; s/\s+//g for (@array2);
into one:
tr/ //d for my @array2 = @array1;
The tr/// here only treats blanks instead of general white space, but that's easily changed if necessary.

Anno

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-20 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found