>>>>> "JG" == Jim Gibson <[email protected]> writes:
>> i'm thinking about trying to include the whitespace cleanup in the >> s/// but i'm thinking it'll be an ugly piece of code i'll always have >> trouble understanding. JG> Use a separate regex instead of the join/split: JG> $name =~ s/\s+/ /g; normally i would agree, but his split also deleted leading and trailing whitespace since split ' ' has that special side effect. JG> Not ugly. Easy to understand: "substitute any substring of one or more JG> whitespace characters with a single space character". even better and faster is to use tr/ //s (assuming only spaces and not tabs/newlines, etc). uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
