Nov 19, 2017, 1:27 PM
Post #6 of 10
open my $fh, '<', \<<EOF; reads the 'in-memory' file delimited by the EOF tokens at the top and bottom. I used this construct just to create the in-memory file instead of creating the file separately.
Re: [tester_V] failing to copy files
[In reply to]
This feature became possible with perl version 5.08, I believe. If you're having problems, just open the file the way you do in your code - open (my $filelist_fh, '<', $list) or die "Cannot open $list $!"
My code just shows how to get the filename using 'fileparse' from the File::Basename module.
I just printed the new path/filename to illustrate how it works. You would use your copy here instead.
copy ($line, "$ndirname1$filename") or die "Cannot copy $line $!";