I wonder what changes one would consider if the lists were long and you were worried about performance.
Hashes are relatively fast; if you're worried about loading the whole thing into memory, a database (such as DBD::SQLite) or maybe DBM file come to mind.
But first, how large are the files? How much memory and CPU usage is "too much"? If you're not approaching those limits don't worry just yet :-)
(By the way, while it doesn't really hurt anything except readability, you don't need to declare use strict; use warnings; etc. at the top of every sub if you've already declared it at the top of the file.)
In reply to Re^4: hash substitution in regex
by Anonymous Monk
in thread hash substitution in regex
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |