3 # This is a script for removing trailing whitespace from lines in files that
4 # are listed on the command line.
6 # This subroutine does the work for one file.
11 open(IN, "$file") || die "Can't open $file for input";
24 open(OUT, ">$file") || die "Can't open $file for output";
30 # This is the main program
32 $, = ""; # Output field separator
33 for ($i = 0; $i < @ARGV; $i++) { &detrail($ARGV[$i]); }