String interpolation while using backreference and capturing in perl.
mycode.txt:
Code:
my $PATH="/home/test.txt"; read.txt: Code:
fnOpenLog\(([\w&\*\s]+)\,([\w&\*\s]+)\,([\w&\*\s]+)\) I am not able to print the captured string in "Changed string". Interpolation is not happening while reading from file. |
I solved it.
The changed string must be assigned as, eval(qq/$srcstr[1]/). This adds double quote and then evaluates the string. |
All times are GMT -5. The time now is 09:01 AM. |