Help for this page
open(STDOUT, ">my_txt_output.txt"); my $fh = new IO::Handle(); $fh->fdopen( fileno( STDOUT ), "w" ); $pop->HeadAndBodyToFile( $fh, $i ); close STDOUT;
open(my $fh, '>', 'my_txt_output.txt') or die("Can't create my_txt_output.txt: $!\n"); $pop->HeadAndBodyToFile( $fh, $i );