windows-nt/Source/XPSP1/NT/shell/shdocvw/dlg.pl
2020-09-26 16:20:57 +08:00

40 lines
580 B
Perl

#
# This perl script removes extra lines & spaces from a file
#
while (<STDIN>) {
$line = $_;
#
# Remove blank lines
#
if ($line =~ /^\s*$/) {
;
} else {
#
# Remove extra spaces from the file and then remove any spaces at
# the beginning & end of each line
#
$line =~ s/\s+/ /g;
$line =~ s/^\s//g;
$line =~ s/\s$//g;
print "$line\n";
}
}
#
# This script replaces the sed script dlg.sed
#
# /^$/d
# /^ *$/d
# s/ / /g
# s/ / /g
# s/^ //g
#