#! /usr/bin/perl -w use FileHandle; $fh=FileHandle->new(">blarg"); open(STDOUT, ">&$fh") or die "Argh: $!"; print "foo bar\nbaz\n"; $fh->close();