in reply to regex match with interpolated pattern
You're date variable is using / as the delimiter. As a result you aren't matching the pattern you think you are. You could just use a different delimiter for your pattern.
dsb
This @ISA my cool %SIG
Or you could call quotemeta() on your variable.if ($_ = m%$dm%) { #stuff }
quotemeta() will escape all non-word characters.my $dm = quotemeta($date);
UPDATE: After reading hv's reply, I agree with him. SOmething didn't seem right to me as I was replying...he caught it though :)
dsb
This @ISA my cool %SIG
In Section
Seekers of Perl Wisdom