flush STDOUT; #### my $fh; my $out; my $old_stdout; open $fh, '>', \$out; $old_stdout = select $fh; my $x = $pin->net->dump_drivers(); select $old_stdout; close $fh; print $out; # This has the output you want