in reply to
Re: Problem with ampersand and regex
in thread Problem with ampersand and regex
You are correct and thank you for pointing that out. Unfortunately, I am still having problems though. In an attempt to make the post easy to read, I left out some of the code and that makes the answer thus far impossible as far as I can see. Here is how my code should have looked:
foreach my $line (@array) {
if ($line =~ /mail: /) {
my $mail = substr($line, $+[$#+] );
print "mail=$mail\n";
}
}
With that, I see no way to use the single quotes as suggested. Any other possible solutions??
Thank you again.