open(IN,"foo") or die "blah\n$!"; while() { do_something_with_perls_special $_; ($probably,$they,$want,$to) = split(/;/); $probably =~ s/$change/$somestring/g; perform_some_test() and print "The Result\n"; } close IN;