I realized that, out of all of the PERL code Ive written, Ive only been
able to assign to a variable from a pattern match within an IF statement:

if ( /^From:(.*)$/ )
{
        $From = $1;
}

Simple enough.  But now I wanted to go deeper and capture only the
email address.

Problem is:
              $from_ = $From =~ /@/;
returns 1.

I didnt want the return status.  In this example I wanted @
And I didnt want to use another IF statement
              if ( $From =~ /(@)/ )
              {
                     $from_ = $1;
              }

Ive searched perl.com and Google but Im not quite sure what to
search for.  I tried googling "PERL assign* match*" (w/o the quotes)

So is there a non-IF statement way of doing this?


Thanks
 Birl

Please do not CC me responses to my own posts.
I'll read the responses on the list.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to