Perl e expressão regular para extração de texto PDF

#!/usr/bin/env perl
use strict;
use warnings;
  
my $dirname = shift;      # first command-line argument.
opendir(DIR, $dirname) or die "can't open $dirname: $!\n";
@files = readdir(DIR);
closedir(DIR);
foreach my $file (@files) {
   print "$file\n";
}
Naagmani Molakatala