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

Re: Removing whitespace

by BUU (Prior)
on May 07, 2002 at 12:46 UTC ( #164614=note: print w/replies, xml ) Need Help??


in reply to Removing whitespace

s/\s*//g; will remove all the whice space in your var, as to your specfic one, you could do something like (split /\,/,$user)[1] Which would return the word after the second comma and before the third (if there is one). And have you tried super search?

Replies are listed 'Best First'.
Re^2: Removing whitespace
by Anonymous Monk on Dec 09, 2010 at 22:26 UTC

    It can be done like this -

    $data=" abc " # Remove all spaces $data=~ s/ //g;

    Output - abc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://164614]
help
Chatterbox?
[LanX]: ha ... just read an article saying that some US presidents in the past lost their nuclear codes
[LanX]: xD
[Corion]: The code is 00000000, as always, no?
[GotToBTru]: I remember hearing about somebody misplacing a list of code phrases or something

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2017-01-20 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.