Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Recursive search and delete

by tobyink (Abbot)
on Nov 16, 2012 at 09:36 UTC ( #1004161=note: print w/replies, xml ) Need Help??


in reply to Recursive search and delete

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");
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004161]
help
Chatterbox?
[Discipulus]: but it work!! soon everyone will have plain text logfiles on mswin32!! welcome back to 1987

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2018-01-23 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (254 votes). Check out past polls.

    Notices?