deshdaaz has asked for the wisdom of the Perl Monks concerning the following question:
The output is :my @files = File::Find::Rule->name(qr/UFLEX.*stdf$/) ->file() ->in(cwd()); foreach my $file (@files) { print "$file\n";
/datalogs/TD+/prod/temp/UFLEX13_UD16B208.1apr25_03_45.stdf
I was expecting just the actual file name to be assigned to $file. Why is the path concatenated to my variable? If I use the "dot" to specify current working directory instead of cwd() it works well but then it's searching all the hidden dirs as well when the script is run through cron. My goal is to avoid running hidden . directories. Thanks for reading and helping. Deshdaaz.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File path added to file name variable
by toolic (Bishop) on May 07, 2013 at 23:58 UTC | |
|
Re: File path added to file name variable
by deshdaaz (Novice) on May 08, 2013 at 00:07 UTC |