>> Also needed might be a quick script to remove trailing whitespace from >> a file? > > perl -pi -e 's/\s+$//' file1 file2 ... Oopps! That ate all linefeeds, use this one instead: perl -pi.bak -e 's/[ \t]+$//' file1 file2 ...