
abhisri
Novice
Jun 21, 2006, 1:46 PM
Post #1 of 6
(1957 views)
|
Hello I need to check for file names in a directory and I am using the following condition my @files = grep (/\F*.pos$/i, readdir(DIR)); closedir(DIR); foreach (@files) { $file = $_; print $file } If I change the above script to the following it doesn't work...any help it would be great $file_name = "F*.pos"; my @files = grep (/\$file_name$/i, readdir(DIR)); closedir(DIR); foreach (@files) { $file = $_; print $file }
|