in reply to Re^2: convert directory content to dbf
in thread convert directory content to dbf

That's because the code you were given is wrong. opendir takes two arguments, not one, and returns true if successful. It may help you to look at the opendir documentation. The code should read something like

opendir my $dirHandle, $dirpath or die qq{opendir: $dirpath: $!\n};

I hope this correction helps you make progress.

Cheers,

JohnGG