Title: Message
I overcame the issue by inserting the following line
 
use open IN => ":raw";
many thanks to colin_e and Dutrieux Yves for steering me in the right direction !
-----Original Message-----
From: Conor Lillis [mailto:[EMAIL PROTECTED]
Sent: 20 July 2004 12:46
To: Perl-Win32-Admin (E-mail)
Subject: Ignore rogue EOF

Hi, I havge a script qwhich analyses our Mailsweeper logs for traffic statistic purposes. Unfortunately some spam mailers have started putting EOF chars (hex 1A) into the subject line, causing my script to only partially load the log file when reading the file in. Is there a way to overcome this ?
 
Here is the read statement that is failing, I can provide a snippet of the logfile as an attachment to anyone who is interested..
 
my $logfile= 'v:\\logfile\\20040715.log';
if (-e $logfile){open (LOG,"$logfile") || die $!;}
@array = (<LOG>);
close(LOG);
print "There are "[EMAIL PROTECTED]." lines in the file $logfile\n";
print "Last line ".(@array-1)." is [EMAIL PROTECTED]";
exit;


The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system.


The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system.
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to