in reply to Getting Filehandle from Mail::Mailer

Expanding from chromatic's answer--as he said, Mail::Mailer inherits from IO::Handle, so a Mail::Mailer object is a filehandle.

You said you tried

select $mailer;
Did that not work for you? It worked for me:
my $mailer = new Mail::Mailer 'smtp', 'relay.foo.com'; $mailer->open({ To => 'baz@foo.com', From => 'foo@bar.com', Subject => 'Testing' }); select $mailer; print "This is a test message.\n"; $mailer->close;