You can use the /m modifier to make $ match newlines: $text =~ s/hello$//gm;
See perlre for more information
In reply to Re: end of line anchor in regex
by FunkyMonk
in thread end of line anchor in regex
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |