On Thu, 2008-03-20 at 18:20 +0530, sivasakthi wrote: > Hi all, > > How to form array by using the files available in particular directory ? > > for example, /tmp contains the following files.. > > #ls /tmp > example.txt > file1.txt > file2.txt > file3.txt > sample.txt > www.txt > zzz.txt > > i want to take all the above files in to one array? how to do that?
Off the top of my head: chdir( '/tmp' ); @files = glob('*'); perldoc -f glob