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 reply to Re: My First LinkedIn Article On Perl
by jwkrahn
in thread My First LinkedIn Article On Perl
by pritesh_ugrankar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |