William wrote:
Hello, what is the syntax for having constant in regular expression ? Such asuse constant (NL => '\n'); #check if there is newline in the text my $txt = "foo \n bar";if($txt =~ m/ # ???/x) { }
Constants cannot be interpolated into strings like variables. This applies to interpolation in regular expressions. It's ugly, but this works, /@{[NL]}/ -- Brad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/