Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $directory; @files = grep {-f "$directory/$_" && /\.dat$/i} readdir DIR;
I would like to get: c:\temp\file1.dat
Right now I just get: file1.dat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get fullpath of file using grep
by choroba (Cardinal) on Jan 28, 2015 at 14:15 UTC | |
by jmacloue (Beadle) on Jan 28, 2015 at 15:18 UTC | |
by choroba (Cardinal) on Jan 28, 2015 at 15:25 UTC | |
by jmacloue (Beadle) on Jan 29, 2015 at 15:08 UTC | |
by hotpelmen (Scribe) on Jan 30, 2015 at 15:08 UTC | |
by Anonymous Monk on Jan 28, 2015 at 14:48 UTC | |
|
Re: Get fullpath of file using grep
by RichardK (Parson) on Jan 28, 2015 at 15:12 UTC |