sftriman wrote:
> So I think it can boil down to:
>
> sub fixsp7 {
> s#\A\s+##, s#\s+\z##, tr/ \t\n\r\f/ /s foreach @_;
> return;
> }
sub fixsp7 {
tr/ \t\n\r\f/ /s, s#\A\s##, s#\s\z## foreach @_;
return;
}
Placing the tr/// first reduces the number of characters scanned for
s#\s\z## which makes things slightly faster.
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Perl; it's the only language where you can bless your
thingy.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/