in reply to Regexp for oneliner conversion

Why do you even care about "one liner'ers?"

Why not write a short program that will work on both OS'es?

Why not?

Once you invoke Perl, I don't that it makes a difference if you have 1 line or 5 lines.