Jaime,
I constructed a working script that reproduces your problem, reproduced
below.
You are using those strings from @BASURA as regular expressions.
One problem is that '\C' in '\Cool' is an unrecognized escape sequence to
the regex engine.
The other problem is that '\Pr' in '\Pretty' is recognized as an escape
sequence that introduces a 'unicode character property' named 'r', which
is not defined in C:\Perl\lib\unicode\Is directory. You can read about
\P properties in perlre man page.
Moral: before using an arbitrary string as a regular expressions, you need
to make sure that it does not contain unintended '\' or other metacharacters.
Since in this case '\' is the Win32 filepath separator,
you could perhaps do a $xxx =~ s#\\#/#g; on your variables before
attempting the match. In other cases you might have to play games with
quotemeta().
HTH
Rudif
#!perl -w
use strict;
my $port = 'any';
my %SMTPSESSION;
$SMTPSESSION{$port}{in} = "HELO MAIL\cM\cJ";
my @BASURA = (
'X-Spanska: Yes.*?',
'MAIL FROM: *<?admin__.*>?',
'Subject: *C:\CoolProgs\Pretty Park.exe.*?',
'Subject:.?ILOVEYOU.*?',
'From: Hahaha <[EMAIL PROTECTED]>.*?',
);
for (my $i=0; ($SMTPSESSION{$port}{in} !~ /^$BASURA[$i]$/i); $i++)
{
print "$i, $BASURA[$i]\n";
}
__END__
Unrecognized escape \C passed through before HERE mark in regex m/^^Subject:
*C:\C << HERE oolProgs\Pretty Park.exe.*?$/ at H:\devperl\activestate\jaime20010701.pl
line 19.
0^X-Spanska: Yes.*?
1^MAIL FROM: *<?admin__.*>?
Can't find unicode character property definition via main->r or r.pl at
unicode/Is/r.pl line 0
________________________________________
E-Mail for everyone! http://www.bluemail.ch/ powered by Bluewin!
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users