I'm writing a POP3 client in Perl using Mail::POP3Client (mostly to better learn Perl programming) but I am running into a wierd problem. So that long messages don't scroll off the screen, I am printing the messages to
more. However, if at any time you hit
q to quit
more, I get
Broken pipe and dumped back to the command line. This however does
not happen on another Linux box and a Solaris box that I have access to (the Linux box is almost identical in its software install). A working (or not working) example of the code is as follows:
#!/usr/bin/perl -w
use Mail::POP3Client;
use strict;
my $pop = new Mail::POP3Client( USER => "(user name omitted)",
PASSWORD => "(password omitted)",
HOST => "localhost",
AUTH_MODE => "PASS" );
my $body = $pop->Body(1);
open (MORE,"|more");
print MORE $body;
close (MORE);
$pop->Close();
I'm stumped, as it was working fine then just... stopped... I can also print the contents of a file piped through more using Perl code and quit it with q just fine. Any help?