R
R Krause
I know that $/ is the input record separator. But that doesn't seem to
affect any change in the behavior of regular expressions in normal and
multi-line mode.
For example, this returns false since we end the string with a CR
instead of a LF:
$var = "Hello\r";
return 1 if( $var =~ m/^Hello$/ );
How does one change the default newline character used in pattern
matching operations? Is there a Perl variable that can be set?
TIA,
--Randall
affect any change in the behavior of regular expressions in normal and
multi-line mode.
For example, this returns false since we end the string with a CR
instead of a LF:
$var = "Hello\r";
return 1 if( $var =~ m/^Hello$/ );
How does one change the default newline character used in pattern
matching operations? Is there a Perl variable that can be set?
TIA,
--Randall