On Oct 25, Rice, Elizabeth A. said: >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...
You should use \x0a instead of \xa. >if ( $EMAIL ne "" ) { > print "inside EMAIL code test \n"; > if ( $INFECTED == 1 ) { > print "inside INFECTED code test \n"; > 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>; Here's your mistake. Calling <VDOSLOG> is trying to READ from the filehandle. If you have warnings on, you'll hear about that. You want to write to it: print VDOSLOG; will print $_ to VDOSLOG. > } > > close VLOG; > close VDOSLOG; > >$ perl -w ck_nimda.pl -d2 -e [EMAIL PROTECTED] -f /u/homedirs/id03l/scripts -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]