in reply to How to read contents of directory into an array?

The File::Slurp module from CPAN will also do what you require.
#!/usr/bin/perl -w use strict; use File::Slurp; my $DIR="directory"; my @Files=read_dir($DIR); my $ln=@Files; for(my $x=0;$x<$ln;$x++){ print"File: $Files[$x]\n"; }
This module is also available for ActiveState Perl as well, by using the PPM.

TStanley
--------
There's an infinite number of monkeys outside who want to talk to us
about this script for Hamlet they've worked out
-- Douglas Adams/Hitchhiker's Guide to the Galaxy