#!/usr/bin/perl -w open Test, $ARGV[0] or die "$ARGV[0]: $!\n"; while () { s/th/TH/gi; print; } close Test;