$ perl -MO=Deparse -e 'while($file = readdir(D)) { print $file; }' while (defined($file = readdir D)) { print $file; } -e syntax OK