- or download this
while ($data = <$fh>) {
# do something with $data
...
} else {
# handle EOF
}
- or download this
while (1) {
undef $!; # doesn't really undefine $!
...
}
# do something with $data
}
- or download this
undef $!;
while ($data = <$fh>) {
...
if (defined $!) {
# handle readline error
}