in reply to no reaction on string replace

Just tried to replace a string called "test" by "replace" in a txt file
Your code looks for the string <text> (with angle brackets). What happens if you just use:
$_ =~ s/test/replace/g;

If that doesn't work, try tips from the Basic debugging checklist: print and Data::Dumper.

Please edit your post and add code tags around your code: Writeup Formatting Tips