perl -i.bak -pe 's/\bfrog\b/toad/g' txtfile