in reply to Redirecting STDOUT to a FileHandle ?
Hope this helps,#! /usr/bin/perl -w use FileHandle; $fh=FileHandle->new(">blarg"); die 'Not open' unless defined $fh; open(STDOUT, ">&".$fh->fileno) or die "Argh: $!"; print "foo bar\nbaz\n"; $fh->close();
Jeroen
"We are not alone"(FZ)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Redirecting STDOUT to a FileHandle ?
by chb (Deacon) on Apr 04, 2001 at 12:49 UTC |