in reply to Regular Expression

If the question you intended -- but didn't ask -- is "Can I do this in Perl?" the answer is an emphatic "YES!"
Using Perl, you can do almost anything except put the toothpaste back in the tube or wash the windows.

But, in accord with the local customs, values and mores, you really should:

  1. Ask a Perl question.... not a *nix-ish one
        and
  2. Show your code; quote any errors or warnings; and describe how your attempt at that point fails or fails to accomplish what you want.

If you undertake that (using perldoc -f open, perldoc perlre or, perhaps, the Tutorials at this site) you'll find welcome and high quality help.


++$anecdote ne $data