in reply to save regex in a file?
$re = qr/abc(def|ghi)(?:jkl)+/i; open RE, "> my_re.pl" or die "can't write to my_re.pl: $!"; print RE $re; close RE; # later open RE, "< my_re.pl" or die "can't read my_re.pl: $!"; chomp($re = <RE>); close RE;
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: save regex in a file?
by Hofmator (Curate) on Oct 16, 2001 at 15:16 UTC |