sub ls { my $path = @_ ? shift : "."; local *DIR; opendir DIR, $path or die "can't ls $path: $!"; return grep { $_ ne "." and $_ ne ".." } readdir DIR; }