print $2 if ($text =~ /^(From|To|Reply-To):\s+(.+)/);
That works for me in your test example.
What you should be doing is looking for the .+ part of your regex and you're not saving that bit. You need to say (.+) and look at $2 and you should be fine. I also moved the : outside your or statement as there's no need that I know of to type that : 3 times when you can get away with once. :)
Hope that helps!
There is no emoticon for what I'm feeling now.
In reply to Re: Re: Re: Re: grabbing certain lines
by Popcorn Dave
in thread grabbing certain lines
by imlou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |