laziness, impatience, and hubris | |
PerlMonks |
Re: program cant find values that start with $by BillKSmith (Monsignor) |
on Feb 01, 2020 at 14:13 UTC ( [id://11112226]=note: print w/replies, xml ) | Need Help?? |
Your original code gives the user the full power of regular expressions. When he intends a literal dollar sign, he has to escape it himself. The \Q...\E solution restricts him to literal character searches. From a security viewpoint, this restriction is a huge benefit. Casual users will not mind the restriction, in fact most will appreciate the convenience it provides.
Bill
In Section
Seekers of Perl Wisdom
|
|