I
it_says_BALLS_on_your forehead
i think i just need a fresh set of eyes. why would pre-compiling the
pattern make this fail?
#!/usr/bin/perl
use strict; use warnings;
my $entry = qr/login\/response/; # prints "did not match.".
# my $entry = 'login/response'; # prints "matched."
print $entry, "\n";
my $record = q{08/16/2006 00:00:01 GET
/ftgw/Fas/Fidelity/RtlCust/Login/Response blah blah};
if ( $record =~ m/$entry/i ) {
print "matched.\n";
}
else {
print "did not match.\n";
}
pattern make this fail?
#!/usr/bin/perl
use strict; use warnings;
my $entry = qr/login\/response/; # prints "did not match.".
# my $entry = 'login/response'; # prints "matched."
print $entry, "\n";
my $record = q{08/16/2006 00:00:01 GET
/ftgw/Fas/Fidelity/RtlCust/Login/Response blah blah};
if ( $record =~ m/$entry/i ) {
print "matched.\n";
}
else {
print "did not match.\n";
}