Lee Goddard wrote: > At 07:59 05/07/2002, $Bill Luebkert wrote: > >> I'm afraid you will find that that is the fastest method except you >> wrote it wrong - there is no need for the while {} part: >> >> my $str = " this is a test files "; >> $str =~ s/^\s+//; $str =~ s/\s+$//; >> print $str, "\n"; > > > What's wrong with: > > s/^\s+(.*[^\s]+)\s+$/$1/sg; > > Surely something?
Slightly slower according to previous benchmarks. -- ,-/- __ _ _ $Bill Luebkert ICQ=162126130 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs