in reply to How do I speed this up?

Uh, that code has too many $contsant's. Let's see... How about code that generates code (always fun!)
# # Generate regex code from hash (untested) # my $code; foreach my $key (keys %const_hash) { $code .= qq( \$const =~ s/$key/$$const_hash{$key}/;\n ); } my $const = 'fill string here'; eval $code; die $@ if $@; # die on error
dwatson@netcom.com