in reply to extracting lines from a string - while ignoring the \n character
results in: 3 lines## single quotes around heredoc my $string = <<'STRING'; one. two \n \n . three. STRING my @lines = $string =~ m/^(.*?)$/msg; print scalar @lines, " lines\n";
|
|---|