perl -i.bak -pe 's/Java/Perl/i' file.txt