For starters, use strict, use warnings, change your file opens to the canonical "or die" style, and convert 'say' to 'print' with a backslash-n at the end. With respect to the example I provided, making those changes will enable you to remove the 'use Modern::Perl;' line, with approximately the same intended outcome.
Dave
In reply to Re^3: replacing string in multi-line text file
by davido
in thread replacing string in multi-line text file
by jerryran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |