#!/usr/bin/perl # This is a PERL script. # First it removes all lines consisting of \n only. # Then it adds one blank line after every line. # commandline contains input file name(s). # Output to standard output. # You should use output redirection. while ($_ = ) { s/^\n//; # Removes all lines of "\n" only. s/\n/\n\n/; # Adds a blank line after every line. print $_; } # Excercise for students: Figure out this code.