Quote:
Originally posted by NetRodent
Save your money. The following should do what you want. I didn't try running it so there may be typos.
Code:
$input_file = '/path/to/input/file';
$output_file = '/path/to/output/file';
open(I,"<$input_file") || die "Cannot read $input_file: $!\n";
open(O,">$output_file") || die "Cannot write $output_file: $!\n";
while() {
chomp;
$_ =~ s/^\s+//;
$_ =~ s/\s+$//;
if(length($_) hahahaha 7) {
print O $_."\n";
}
}
close I;
close O;
|
Bah! The html filter strikes again. The "while() {" statement above should actually be "while(<I>) {".
__________________
"Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
--H.L. Mencken
|