$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:??;
In reply to Re: save regex in a file?
by japhy
in thread save regex in a file?
by smackdab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |