I am trying to replace string with a new string containing $(dollar) sign in a existing file.
I have used below (regex) line in my code but I am not able get the expected result. Please suggest the solution.
system("perl -pi -e \"s/length\\s+.*/length [index $pkt_len]/g if /^\\s*set_value\\s+length/\" $filename")
perlprocess from within aperlprocess, you could also do everything in the firstperl. Please show the content of the file$filename, the value of$pkt_lenand what should be the expected output (the new content of$filename)perlfrom within a Perl program, you should use$^X. That's the current perl binary that's running. If plainperlfinds another one in your path but uses your current environment, you can get mismatches in library versions.