- or download this
$ perl -MO=Deparse -e 'while (<>) {}'
while (defined($_ = <ARGV>)) {
();
}
-e syntax OK
- or download this
$ perl -MO=Deparse -e 'while (my $line=<>) {}'
while (defined(my $line = <ARGV>)) {
();
}
-e syntax OK
- or download this
$ perl -MO=Deparse -e '@a=qw/a b c/; print while <@a>'
@a = ('a', 'b', 'c');
use File::Glob ();
print $_ while defined($_ = glob(join($", @a)));
-e syntax OK
- or download this
$ perl -le '@a=qw/a b c/; print while <@a>'
a
b
c