how to use "while" with <<EOF?
- From: jidanni@xxxxxxxxxxx
- Date: Sat, 24 Jan 2009 02:34:16 +0800
Gentlemen, the perl docs don't anywhere reveal how to use "while" with
<<EOF.
How do you say this right?:
while(<<EOF;){my @F=split; if((pop @F) =~ $ARGV[0]){print "@F\n"; last}
nurds bla.html
....
turds surds mo.html
EOF
Nope, there's just no guessing what's right. Who knows. Mystery.
{my @F=split; if((pop @F) =~ $ARGV[0]){print "@F\n"; last}}while <<'EOF';
while(<<EOF){
a
b
c
EOF
print;
}sorry.
.
- Follow-Ups:
- Re: how to use "while" with <<EOF?
- From: Dr.Ruud
- Re: how to use "while" with <<EOF?
- From: Tad J McClellan
- Re: how to use "while" with <<EOF?
- From: Xho Jingleheimerschmidt
- Re: how to use "while" with <<EOF?
- From: darkon
- Re: how to use "while" with <<EOF?
- Prev by Date: Regex for <option> ... </option>
- Next by Date: Re: Regex for <option> ... </option>
- Previous by thread: Regex for <option> ... </option>
- Next by thread: Re: how to use "while" with <<EOF?
- Index(es):