#! /usr/bin/perlopen (FILEOUT,">newfile") || die "Can't open newfile: $!\n";select(FILEOUT); open (DB, "while() { print ; }select(STDOUT); print "Good-bye.\n";