in reply to
Extracting Multiline Records from a file
Not knowing the particular line you're trying to use, try enclosing the
$PhoneNumber
with \Q and \E a la:
/^.*\Q$PhoneNumber\E$ / ...
[download]
The \Q and \E tell the perl regex interpreter to ignore special characters that may exist in your
$PhoneNumber
variable (such as parens and dashes)
Comment on
Re: Extracting Multiline Records from a file
Select
or
Download
Code
In Section
Seekers of Perl Wisdom