>> 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.
>You can use a simple oneliner in Perl to convert text files see >http://groups.yahoo.com/group/perl-beginner/message/6263 This got me a ways down the road... Here's what I coded but two or more things are still in error... 1- Nothing gets printed. If I say print <VLOG>; then I get the output file before conversion. But when I put the filehandle into the while loop and then try to print $_ there is no output. 2- I get "Illegal Hexadecimal Digit '\' ignored" against the line that has the regex. If I change the regex to s/\xa/\xda/g then I no longer get this error, but still no output is given. This is on OS/390 Unix. I'm not sure if EBCDIC is messing up the regex or not... Any ideas? Here's the code snip.... if ( $EMAIL ne "" ) { print "inside EMAIL code test \n"; if ( $INFECTED == 1 ) { print "inside INFECTED code test \n"; ## convert the logfile to dos # #system("/usr/bin/unix2dos $VIRUS_LOG $VIRUS_LOG"); open (VLOG, "<$VIRUS_LOG") or die "Error cannot read virus log: $! \n"; open (VDOSLOG, "$>VIRUS_DLOG") or die "Error cannot open dos log: $! \n"; while( <VLOG> ) { print; s/\xa/\xd\xa/g; print; print <VDOSLOG>; } close VLOG; close VDOSLOG; $ perl -w ck_nimda.pl -d2 -e [EMAIL PROTECTED] -f /u/homedirs/id03l/scripts Illegal hexadecimal digit '\' ignored at ck_nimda.pl line 462. OS type is OS/390 ... (other debugging output I have specified) Use of uninitialized value in string ne at ck_nimda.pl line 268, <FIND> line 5. (this is the fifth iteration of a loop, EOF) Email address is [EMAIL PROTECTED] Infected var = 1 inside EMAIL code test inside INFECTED code test $ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]