...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 ]
- directory listing to array Evan McNabb
- Re: directory listing to array Randal L. Schwartz
- Re: directory listing to array Evan McNabb
- Re: directory listing to array Paul
- Re: directory listing to array Jean-Matthieu Guerin
- RE: directory listing to array John Storms
- Re: directory listing to array Shawn
- Re: directory listing to array Pete Emerson
- Re: directory listing to array Shawn
- Re: directory listing to array Jeff 'japhy' Pinyan
- Re: directory listing to array Peter Scott
- Re: directory listing to ar... Richard Hulse
- Re: directory listing t... iansmith
- Re: directory listing t... Randal L. Schwartz
- Re: directory listing t... iansmith
- Re: directory listing to array Michael Fowler
- RE: directory listing to array Andrew Nelson
- RE: directory listing to array Peter Cornelius