...and just to include both .jpg and .jpeg like John's program:

opendir DIR, "./" or die "can't open $directory: $!\n";
@files = grep /jpe?g$/i, readdir DIR;

Nice code, Shawn. I must admit that my original way of doing this was even worse
than John's (by not using opendir and closedir). Zoiks. Guess that's why I'm
reading this list!

    Pete

Shawn wrote:

> opendir DIR, $directory or die "can't open $directory: $!\n";
> @files = grep /jpg$/i, readdir DIR;
>
> On 06/07, John Storms rearranged the electrons to read:

[ snip ]

Reply via email to