jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:
output is:if (lc($Message) =~ /^db /) { print "Content-type:text/html\n\n"; print "c=$Message<br>\n"; $Message = s/^db //; $Message = s/^Db //; $Message = s/^dB //; $Message = s/^DB //; print "m=$Message"; exit; }
c=Db test4 m=
My aim is to remove the initial Db but in fact everything is removed, it would seem.
Why isn't it doing what I expect?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: search and replace confusion
by davorg (Chancellor) on Nov 08, 2006 at 11:53 UTC | |
by jonnyfolk (Vicar) on Nov 08, 2006 at 12:07 UTC | |
|
Re: search and replace confusion
by reneeb (Chaplain) on Nov 08, 2006 at 11:56 UTC |