Making a copy of STDOUT that redirects the text that gets printed is one way, though there are probably better solutions than this...
#!/usr/bin/perl -w use strict; print "Print this\n"; { local *STDOUT; open(STDOUT,">/dev/null"); # don't allow this include file to print anything do "test.inc"; close(STDOUT) } print "Print this too\n";
In reply to Re: A Strange print() predicament.
by jasonk
in thread A Strange print() predicament.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |