perl -wpe's/my_pattern/my_replacement/g' in_file > out_file