in reply to Find all JPEG files in a directory

Since this is a Linux environment, you can use the 'ls' command:

ls *.jp* > textfile

Not Perl, but it works in Linux.

Replies are listed 'Best First'.
Re^2: Find all JPEG files in a directory
by holli (Abbot) on Aug 12, 2005 at 06:09 UTC
    #perl use File::Slurp; write_file ('filenameW', $ENV{OS} =~ /Windows/i ? `dir /b *.jpg` : `ls + *.jpg` );
    Update: changed single qutoes to backticks as originally intended.


    holli, /regexed monk/