develooper Front page | perl.beginners | Postings from August 2003

FILEHANDLE to print to nothing

Thread Next
From:
Dan Muey
Date:
August 25, 2003 14:34
Subject:
FILEHANDLE to print to nothing
Message ID:
D6D77DB239A2004BB08A240E2E71460D12BCBF@LSLOFFICE.infiniplex.infiniplex.com
Howdy,

I am benchmarking some stuff that does multiple print staements.

What I'd like to do is print to a file handel so ethat the stuff I'm printing doesn't go to the screen.

Ie instead of print "stuff";
print BITBUCKET "stuff";

That way the output of the benchmark test won't be screwy on the terminal or cause 500 errors if someone runs this test before an html header gets printed.

Any ideas of how to create a filehandle to the void?

open(VOID,'');
print VOID 'test';
close VOID;

TIA

Dan

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About