in reply to change a line or string in file

This is all you have to do:
perl -pi -e 's!/prj/sw/tool!/prj/vlsi/toolsmodule!;' test.txt
if you just need to make that one substitution in test.txt, with no other conditions or considerations. Check the -i switch documented in the perlrun POD to see how to make a safe backup of the original file in the process.