Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: spliting new lines and spaces

by krusty (Hermit)
on May 07, 2004 at 15:57 UTC ( #351503=note: print w/ replies, xml ) Need Help??


in reply to spliting new lines and spaces

The sample code you have given only contains one element in the array. Is that what you really meant?

The following code should work to get rid of any whitespace characters (tab, newline, form feed, literal space, carraige return) in the elements of your array:

foreach (@test){ s/\s+//g; }
Good luck,
Kris


Comment on Re: spliting new lines and spaces
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-07-23 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (131 votes), past polls