- or download this
while (<STDIN>) { print; } # tests for definedness
print while <STDIN>; # tests for definedness
- or download this
while ($_ = <*>) { print } # tests for definedness
print while ($_ = <*>); # tests for truthfulness
- or download this
% mkdir newdir
% cd newdir
...
% perl -le 'print while ($_ = <*>)'
[note nothing is printed here]