#! /usr/bin/perl use v5.14; use warnings; ## 2/7/19 my $in = $ARGV[0]; my $out = $in; $^I = ".out"; while (<$in_fn>) { #take one line of input at a time chomp; s/fred/Valentine/gi; print $out_fh $_; }