my @files = grep { -f } glob '*'; # warning! some elements in @files might not be images.