#!/usr/bin/perl use strict; use warnings; while (<>) { chomp; ...; print ...; } #### perl script.pl infile > outfile