open (DB,"ext.log") or die("There was a problem opening the file."); my @data; while (my $entry=) { my @fields = split(/ /,$entry); push @data, \@fields; } close DB; #### open(DB, ">", "ext.log") or die $!; foreach my $row (@data) { my $line = join(' ', @$row); print DB $line, "\n"; } close DB;