M
mani
Hi,
I see this code :
while(<STDIN>){
if(/^From: /){
if(/merlyn/){
print "Email from merlyn\n";
}
last;
}
if(/^$/){
last;
}
}
what i cant understand is this :
I know that whatever is read from STDIN is read into $_ I thought if
we are looking for something which has From: we should look for this
pattern in $_
but i am seeing that the $_ never appers in the first if control
statement.
Is it understood that we are refering to $_ everywhere if not
specified in a control statement ???
thanks
\
Mani
I see this code :
while(<STDIN>){
if(/^From: /){
if(/merlyn/){
print "Email from merlyn\n";
}
last;
}
if(/^$/){
last;
}
}
what i cant understand is this :
I know that whatever is read from STDIN is read into $_ I thought if
we are looking for something which has From: we should look for this
pattern in $_
but i am seeing that the $_ never appers in the first if control
statement.
Is it understood that we are refering to $_ everywhere if not
specified in a control statement ???
thanks
\
Mani