I don't think you want this combination. $File::Find::name is the path including any parent directories, but you're already chdir'ed into the directory containing the file. Inside wanted, you want to use $_. After the execution is complete, you'll want $File::Find::name.sub wanted { my $fileopened = $File::Find::name;
More specifically, when you're thinking about "a/b/c.txt", you're already in the directory "a/b", so trying to open "a/b/c.txt" is wrong now. You want just c.txt, which is in $_. Review the thread beginning in "using file::find::name and file tests". (update: oh, that was you. apparently you didn't learn anything from the other posts!)
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: using filehandle to open files listed in array
by merlyn
in thread using filehandle to open files listed in array
by richill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |