in reply to File::Find question

I may be missing something, but wouldn't

if ($total == 0) { $total = "Error"; } else { $total = sprintf("%0.2f", $total); }
work?

Replies are listed 'Best First'.
Re: Re: File::Find question
by Anonymous Monk on Jun 06, 2003 at 20:08 UTC
    That wouldn't exactly work because sometimes a directory truly may be empty, in which case I want to know that. I am wanting it to print "Error" when there is a problem accessing the files (because of permissions, file is open, etc.). I hope this is a little clearer.