Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: RegEx needed

by krujos (Curate)
on Dec 31, 2002 at 15:50 UTC ( #223350=note: print w/replies, xml ) Need Help??


in reply to Efficient trimming of trailing whitespace from array elements?

perldoc has a few answers to this too, you should check them out. This should work for you though.
s/(\s+)$//;

Replies are listed 'Best First'.
Re: Re: RegEx needed
by Juerd (Abbot) on Dec 31, 2002 at 15:53 UTC

    s/(\s+)$//;

    You can leave out the parentheses. (Unless you need $1, but you don't, in this case)

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://223350]
help
Chatterbox?
[Corion]: At least back in the day Firefox (well, Netscape) used to cache the DNS itself because there was no OS API to asynchronously resolve names (?) Maybe that code still lives on
[Corion]: Mhmm. Our datawarehouse is named after the department, except that the department changed its name one year ago. Now I guess I'm looking for the moral equivalent of "THE Datawarehouse", where "THE" stands for "Traditional High-valued Expertise" ;)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-07-26 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (386 votes). Check out past polls.