Perlだと
opendir(D,".");
@files = readdir D;
closedir D;
foreach (@file) {
 print "$_\n";
}

PHPだと
$dh = opendir(".");
while (($file = readdir($dh)) !== false) {
 echo "$file\n";
}
closedir($dh);

PHPはfalseと比較してる部分が特にダサい