my %r = qw( & amp > gt < lt ); $string =~ s/([&<>])/$r{$1}/g;
But I seriously doubt any speed difference will really be significant.
- tye
In reply to Re: using tr/// (hash)
by tye
in thread using tr///
by chuckd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |