Use select:
$ cat b.pl #!/usr/bin/env perl use strict; use warnings; print "foo!\n"; $ perl -I. -e 'require "b.pl";' foo! $ perl -I. -e 'open my $o, ">out"; select $o; require "b.pl";' $ cat out foo!
In reply to Re: Output redirection using “require” in perl
by hippo
in thread Output redirection using “require” in perl
by Sandeep Kumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |