Trying to pull a list of C++ files from a fixed project directory. The system command shows a list of files verifying that the directory is correct. Find::File::Rule returns an empty list. I've tried many versions of the command block and I'm out of ideas at this point. This has to be a duh moment. What have I missed?
File::Find::Rule is up to date on my install.
I will add a grep section later to pull #include statements out of the files.
Thanks!
#! /usr/bin/perl use strict; use warnings; use File::Find::Rule; use Data::Dumper; my $dir = ('~/Hamradio/Keithsdr/KEITHSDR-main/SDR_RA8875/'); system "ls $dir"; # This works and verifies the search # path - $dir my @files = File::Find::Rule->file() ->name('*.cpp') ->in($dir); print Dumper $dir; # Good directory string # $VAR1 = '~/Hamradio/Keithsdr/ # KEITHSDR-main/SDR_RA8875/'; print Dumper(\@files); # Empty list $VAR1 = []
James
There's never enough time to do it right, but always enough time to do it over...
In reply to File::Find::Rule Help Needed by jmlynesjr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |