To match a newline, use the /s modifer (treat as a Single line)
$x = qq(
andrew
was
here
);
$x =~ /andrew .* here/xs;
# matches as the /s carries the search over the newlines
$x = qq(
andrew
was
here
);
$x =~ /andrew .* here/xs;
# matches as the /s carries the search over the newlines
No comments:
Post a Comment