I am modifying a perl script that was originally written for a Solaris
platform, where the unix2dos system command is available.  The script puts
text and filenames into a log file, then runs unix2dos command against the
log file, then ships it off as part of a sendmail command. 

on OS/390 there is no unix2dos command available.  So, if I use the file as
is, it is sent in the email but it comes out with no carriage returns, etc.,
making the file unreadable when it is of any significant size.

I think that putting the output lines into an array and then printing the
array to the sendmail variable would be a valid workaround.  Can anyone
confirm this?
(I'm not too adept at perl yet, and I'm hoping to confirm the validity of
this before I attempt to implement it).

Here's a snip of the code as it exists now.....

 if ( $FIRSTIME == 0 ) {
    $cur_time = gen_timestamp;
    print VLOG "####\n";
    print VLOG "#\n";
    print VLOG "#   Host:,$HOSTNAME\n";
    print VLOG "#   OS: ,$OS\n";
    $FIRSTIME = 1;
 }
 print VLOG "$filename\n";     # loop causes multiple $filename(s) to be
output to VLOG
...
...
...
open( MAIL, "| $SENDMAIL" );
print MAIL ("To: $to\n");
print MAIL ("Subject: $subject\n");
print MAIL ("Content-type: text/html\n");

open(TEXT, "$mailfile");                        #$mailfile is the VLOG of
previous snip.
while (<TEXT>) {
   print MAIL;
}
close(TEXT);




Thanks,
Beth

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to