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