Hi, God bless you.
Assuming you are trying to read a line which contains:
email addres: [EMAIL PROTECTED]
Then you can use the postmatch variable ($') to look at the rest of
the line (watch also for the change on the regexp that strips the ':'
and any spaces after it).
On Tue, May 28, 2002 at 07:08:52AM -0700, lz wrote:
>
> while($line = <STDIN>)
> {
> if ($line =~ /^email address:\s*/)
> {
$eaddr = $' if $' !~ /^$/;
> }
> }
This way, $eaddr contains the email address if one has been given, or
otherwise is undefined. Also, to check if it is a valid email address
you may want to check the module Mail::Address (perldoc Mail::Address).
See you
Roberto Ruiz
--
A train stops at a train station; a bus stops at a bus station; on my
desk I have a workstation...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]