in reply to BOTH STOUT and STDERR to same file.
This will overwrite output file in while loop.system("/home/me/ipinfo.pl $_ >$output 2>&1");
What if you append the output?
system("/home/me/ipinfo.pl $_ >> $output 2>&1");
In Section
Seekers of Perl Wisdom