Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: global whitespace delete

by bwana147 (Pilgrim)
on Jul 31, 2001 at 12:25 UTC ( [id://101097]=note: print w/replies, xml ) Need Help??


in reply to global whitespace delete

How about Text::ParseWords?

I haven't tested it but you may use this module to split your strings on whitespace, while still ignoring those that are quoted. Then join the words together:

use Text::ParseWords; @words = quotewords('\s+', 1, $text); $text = join ' ' => @words;

--bwana147

Update: finally, I tested it and it works!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 18:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found