in reply to Order of output when switching filehandles
I didn't test this, but I'd bet that it's faster than running tee -- not to mention quite a bit easer to customize.open(FILE, ">$name") or die "Failed file open: $!\n"; my $stmt = $dbh->prepare("$sql") or die $DBI::errstr; # $sql takes 30- +40 secs. to run $stmt->execute() or die $DBI::errstr; while (my @array = $stmt->fetchrow()) { print; print FILE "$_"; } $stmt->finish(); close(FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Order of output when switching filehandles
by Cirollo (Friar) on Aug 14, 2000 at 22:52 UTC |