IvorW <[EMAIL PROTECTED]> wrote:
...
> use File::Find;
> 
> find( {
>       bydepth => 1,
>       wanted => sub { (-d $_) ? rmdir($_) : unlink($_); },
>       }, 'test');
> 
> rmdir 'test';
...
> I have two problems with this on VMS. The old chestnut about protected 
> directories (you have to do a set prot=o:d before you can delete). This 
> I can work around with adding some extra code if $^O is VMS.
> 
> The more serious problem is that the code does not handle file 
> multiversions. How can I get File::Find to see them.

You needn't. The canonical idiom for this is

  1 while unlink($file);

It's portable, too.

cu,
  Martin
-- 
                           | Martin Vorlaender  |  VMS & WNT programmer
Microsoft isn't the Borg:  | work: [EMAIL PROTECTED]
the Borg have proper       |   http://www.pdv-systeme.de/users/martinv/
networking.                | home: [EMAIL PROTECTED]

Reply via email to