hmb104 has asked for the wisdom of the Perl Monks concerning the following question:
Monks monks monks,
I want to send BOTH STOUT and STDERR to my output.txt file. I know it should be simple, but for some reason I'm getting the error but not the other output. what is a good way to fix get it working?
#!/usr/local/bin/perl use warnings; use strict; my $input = shift; my $output = "/home/me/output.txt"; open (MYFILE, "$input"); while (<MYFILE>) { chomp; system("/home/me/ipinfo.pl $_ >$output 2>&1"); } close (MYFILE);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: BOTH STOUT and STDERR to same file.
by davido (Cardinal) on Sep 03, 2012 at 19:13 UTC | |
Re: BOTH STOUT and STDERR to same file.
by aitap (Curate) on Sep 03, 2012 at 19:02 UTC | |
Re: BOTH STOUT and STDERR to same file.
by remiah (Hermit) on Sep 03, 2012 at 20:01 UTC | |
by hmb104 (Sexton) on Sep 03, 2012 at 20:21 UTC | |
Re: BOTH STOUT and STDERR to same file.
by Anonymous Monk on Sep 04, 2012 at 00:39 UTC | |
Re: BOTH STOUT and STDERR to same file.
by cheekuperl (Monk) on Sep 04, 2012 at 02:50 UTC |
Back to
Seekers of Perl Wisdom