http://www.perlmonks.org?node_id=625580


in reply to substituting constants within regex?

I recommend the Readonly module:

#!/usr/bin/perl -w use strict; use warnings; use Readonly; Readonly my $NEWLINE => '^M'; while (<>) { s/\Q$NEWLINE$//; print; }

Cheers,
Ovid

New address of my CGI Course.