redss has asked for the wisdom of the Perl Monks concerning the following question:
I want to filter out words at the end of a line but it's not working. Why doesn't the below code filter out the word hello at the end of the line?
$text=<<EOT; hello world EOT $text =~ s/hello$//g; print $text;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: end of line anchor in regex
by FunkyMonk (Chancellor) on Dec 09, 2007 at 16:20 UTC | |
Re: end of line anchor in regex
by jrsimmon (Hermit) on Dec 09, 2007 at 16:12 UTC | |
Re: end of line anchor in regex
by dwm042 (Priest) on Dec 09, 2007 at 16:50 UTC | |
Re: end of line anchor in regex
by ikegami (Patriarch) on Dec 09, 2007 at 18:52 UTC | |
Re: end of line anchor in regex
by sh1tn (Priest) on Dec 09, 2007 at 17:39 UTC | |
by Anonymous Monk on Dec 09, 2007 at 18:34 UTC | |
by Anonymous Monk on Dec 10, 2007 at 04:09 UTC | |
by ikegami (Patriarch) on Dec 10, 2007 at 04:37 UTC |