open(my $fr_uuencode, '-|', uuencode => ( $file ) ) or die $!; open(my $to_mailx, '|-', mailx => ( -s => $subject, -m => 'sam@pull.com', ) ) or die $!; print $to_mailx $_ while <$fr_uuencode>;