- or download this
open(OUTPUT,">>${len}.words");
while(<>){
...
print OUTPUT "$_\n";
}
close(OUTPUT);
- or download this
while (<>) {
chomp;
my $len = length;
print OUTPUT $_, $/;
}
- or download this
use IO::File;
my %Handles;
...
}
# This is unnecessary unless you're anal (like I try to be)
$_->close for values %Handles;