Ops, forgot to change blank for \s in regexp:
On Tue, May 28, 2002 at 11:34:09AM -0500, Roberto Ruiz wrote:
> Hi, God bless you.
>
> > while($line = )
> > {
> > if ($line =~ /^email\saddress:\s*/)
^^ also change this.
> > {
See you
Roberto Ruiz
--
A train s
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
while () {
if (!($_)) {
if(m/^email address/) {
}
}
}
I think you want to be shure that you have input, so you match only if the current
line is not empty.
Regs David
--
>
> Hi guys,
>
> while($line = )
> {
> if ($line =~ /^email address/)
> {
>
y 28, 2002 10:09 AM
> To: [EMAIL PROTECTED]
> Subject: checking for an empty string
>
>
> Hi guys,
>
> while($line = )
> {
> if ($line =~ /^email address/)
> {
> }
> }
>
> How can I c
> From: lz <[EMAIL PROTECTED]>
> Date: Tue, 28 May 2002 07:08:52 -0700 (PDT)
> To: [EMAIL PROTECTED]
> Subject: checking for an empty string
>
> Hi guys,
>
> while($line = )
> {
> if ($line =~ /^email address/)
> {
>}
> }
>
> Ho
Hi guys,
while($line = )
{
if ($line =~ /^email address/)
{
}
}
How can I check if $line contains a value or is empty?
Thanks a lot!
__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--