how to use "while" with <<EOF?



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.
.



Relevant Pages