in reply to file copy

File::Copy

use File::Copy; open (my $fh,"<","viewall.pbdid") or die $!; while (<$fh>) { my $from = "/data/pub/pdb/$path"; my $to = "/tmp/$path"; copy ($from,$to) or die $!; }
This assumes that "viewall.pbdid" only contains file names, not paths with subdirectories. If it does, you'll need to check/create the parent directory under /tmp before copying the file, File::Copy will not create them for you. Check out File::Copy::Recursive and File::Mirror if that is the solution you need.

All dogma is stupid.