I don't have three whole years of Perl experience, but I think this is broken. What are you expecting it to do? $regex will contain a line (at least a newline) from the first file given on the command line. What's Perl supposed to do with that when you give it as an expression by itself?
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
In reply to Re^2: modifying a file with regex!
by aaron_baugher
in thread modifying a file with regex!
by rna_follower
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |