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

my $dh = opendir $dirpath or die $!;

I think you have got this a bit wrong. opendir takes two arguments (directory handle and path) and returns true on success. Your code should probably have read

opendir my $dh, $dirpath or die $!;

Cheers,

JohnGG