in reply to replacing values via web
This implies that the number in the filenames and the actual count of files go together. (E.g. you don't delete a file in the middle of the row.)opendir(INCLUDES, $includesdir) or die $!; @includefiles = grep (/exclusives\d+\.tmpl$/, readdir(INCLUDES)); closedir INCLUDES; $num_of_files = scalar @includefiles; # ... $num = $num == 1 ? $num_of_files : 1;
|
---|