Command-line search & replace tool written in Perl, understand regex