CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [tantalum] Removing white spaces at the end of a string: Edit Log



KevinR
Veteran


Feb 12, 2007, 10:37 AM


Views: 12711
Re: [tantalum] Removing white spaces at the end of a string

don't combine them into one. Without testing I am pretty sure using two seperate regexp is faster for what you are doing. What might get you some performnce gain is using the tr/// operator instead of s/// for removing the double-quotes:


Code
$parts[$n] =~ tr/"//d ; #Take out quotes  
$parts[$n] =~ s/\s+$// ; #and trailing white spaces

-------------------------------------------------


(This post was edited by KevinR on Feb 12, 2007, 10:40 AM)


Edit Log:
Post edited by KevinR (Veteran) on Feb 12, 2007, 10:40 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives