I found the answer:
@files = grep {-f "$dir/$_" && m/.xml/} readdir DIR;
Thanks for the help people
In reply to Re^2: Perl List files in directory
by Anonymous Monk
in thread Perl List files in directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |