The error is as NetWallah says, that you are checking to see if the filename equals "abc*.xml*" - not if the filename matches that pattern.
Personally I'd use Path::Class::Rule...
# untested! use strict; use warnings; use Path::Class::Rule; my $rule = Path::Class::Rule->new->file->name("abc*.xml*"); $_->remove for $rule->all("/tst");
In reply to Re: Recursive search and delete
by tobyink
in thread Recursive search and delete
by qwerty80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |