By the time tar has finished the files must be there. Are you running tar (to extract the files) at the same time as the script? If you are, it would be difficult to see when the file actually gets there, the only good way I can think of is to give the output of tar xv to the perl script. So I recommend you to run the tar first and do the copying after the tar process has exitted unless it's absolutely neccessarry to do otherwise.
If you are doing the copying after untarring, I can't really think of any reason why the extracted files won't show up (unless the untarring and the copying are done on two different machines with some network file system). In that case, I'd check for some tricky errors, like newlines at the end of filenames (I often fall in this trap).
Update. I didn't really answer your actual question. The short answer is no. It would be possible to wait for a file to appear, but you'd have to wait until the contents of the file are written completely by tar, as surely you don't want to copy a parital file. This is almost impossible to do without doing something with the tar process.
In reply to Re: Archive::Tar then File::Copy?
by ambrus
in thread Archive::Tar then File::Copy?
by Elijah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |