read a list of a directory
am 12.01.2005 21:15:32 von Simone Phi, is it possibile with perl read the list of all file inside a directory
(examples /test/*.txt) ???
Simone
hi, is it possibile with perl read the list of all file inside a directory
(examples /test/*.txt) ???
Simone
Simone P wrote:
> hi, is it possibile with perl read the list of all file inside a directory
> (examples /test/*.txt) ???
Yes.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
While wandering through cyberspace on Wed, 12 Jan 2005 20:15:32 GMT
Simone P said :
> hi, is it possibile with perl read the list of all file inside a directory
> (examples /test/*.txt) ???
>
> Simone
Yes. There are several methods :
(1) use glob()
(2) use opendir() and readdir()
"Simone P"
news:EzfFd.398483$b5.19369415@news3.tin.it...
> hi, is it possibile with perl read the list of all file inside a directory
> (examples /test/*.txt) ???
Yes, it is possible.
foreach my $file () {
..
}