Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: deleting a list of files

by a (Friar)
on Mar 25, 2001 at 10:29 UTC ( [id://66972]=note: print w/replies, xml ) Need Help??


in reply to Re: deleting a list of files
in thread deleting a list of files

If you:
opendir(ims, ...
your dir handle is "ims", as in 'readdir ims'. The grep is to remove unix files . and .. the current and parent dir links. readdir returns just the filenames, not the whole path, so your chdir will work, but so should his prepend of the path, as in (perldoc -f readdir):
opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!"; @dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR); closedir DIR;

a

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://66972]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-29 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found