in reply to Read a list of files into an array

Here's a couple of ways you can go:

# modification to code you already have.... while( $file=readdir BIN ){ push @array,$file; }
or
# a slightly different play.... # delete the while loop altogether and... @array = readdir BIN ;

Keep in mind you are going to have the "." and ".." directory entries (current working directory and parent directory respectively) in your list and you need to have logic to eliminate those.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg