Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any insight on the syntax would be appreciated.#!/usr/bin/perl -w use strict; use warnings; use constant NEWLINE => '^M'; while (<>) { s/\Q$NEWLINE$//; # incorrect syntax here print; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: substituting constants within regex?
by Zaxo (Archbishop) on Jul 09, 2007 at 07:55 UTC | |
by Anonymous Monk on Jul 09, 2007 at 08:07 UTC | |
Re: substituting constants within regex?
by Ovid (Cardinal) on Jul 09, 2007 at 08:31 UTC | |
Re: substituting constants within regex?
by ForgotPasswordAgain (Vicar) on Jul 09, 2007 at 07:55 UTC | |
Re: substituting constants within regex?
by halley (Prior) on Jul 09, 2007 at 13:46 UTC |