On Aug 10, Craig S. Cottingham said:
>On Friday, August 10, 2001, at 04:30 , Newton, Philip wrote:
>
>> Michel Lambert wrote:
>>> 1) What's the fastest way to strip trailing whitespace ( as
>>> defined by /\s/ ) from a decent-sized string? Decent-sized
>>> means this email, or 100 of these emails concatenated together.
>
> $string = reverse $string;
> $string =~ s/^\s+//;
> $string = reverse $string;
>
>I haven't had any coffee yet this morning, so I'm probably
>missing a way to condense that. Time to break out
>Benchmark.pm....
You are my friend forever. Lambert can tell you why. ;)
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **