Think about Loose Coupling | |
PerlMonks |
Re: My First LinkedIn Article On Perlby jwkrahn (Abbot) |
on Jan 01, 2021 at 22:47 UTC ( [id://11126109]=note: print w/replies, xml ) | Need Help?? |
Hello pritesh_ugrankar. From your article: The qr function allows for the regex to be stored in a variable so one can simply mention s/$regex_1/$regex_2/ instead of typing out the regex between the / and /. The second part of the substitution operator ($regex_2 in your example) is a string, not a regular expression. And therefore: 2) By saying s/$regex2/$regex1/ one can simply reverse the replacement done earlier if the need ever presents itself. That will probably not work.
In Section
Meditations
|
|