On Fri, Jul 20, 2001 at 05:56:43AM -0400, Porter, Chris wrote:
> Could I please have an example of the rmtree function.  Everytime I try to
> run this function my script dies on me.  I'm sure I'm just missing a small
> part of it.

Can you give us an example of how you're using it?  perldoc File::Path
describes pretty explicitly, with examples, of how to use it.  What are you
having trouble with?

 
>  chdir "/u311/world/b25/MAN3/spc" or die $!;
>  # chdir "/u11/tmp" or die $!;
> 
>  opendir(HERE, '.');
> 
>  @AllFiles = readdir(HERE);
> 
>  foreach $Name (@AllFiles) {
> 
>    if (-f $Name) {next}
> 
>    if ((-d $Name) and ($Name =~ /^[A-Z]+$/)) {rmdir $Name or die$!};
> 
>   if ((-d $Name)) {print "$Name\n"}                     

You're not using rmtree anywhere in this code.  Did you paste the wrong
code?


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to