in reply to Want to get regexp list from file

Well, I'm not sure I'd do this, but if you TRUST YOUR USER, you can do:
while (<FILE1>) { do $regex_file; print; }
where $regex_file holds the filename to execute. It's scary though, because the user could put ANYTHING in that file. So maybe you want a sandbox, via Safe:
use Safe; use strict; use warnings; # read the regex file into $code my $code = do { local $/; open my($rx), $regex_file; <$rx>; }; # create a sandbox my $sandbox = Safe->new; # allow acceptable operators (perldoc Opcode) $sandbox->permit_only(qw( :base_core :base_orig )); while (<FILE>) { $sandbox->reval($code); print; }
Try that out.
_____________________________________________________
Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart