use warnings; use strict; # Source Location, Filename, An ID that I need for file processing my @files = ( {path => 'C:\Source1\\', name => 'File1.txt', id => 'Reference1'}, {path => 'D:\Source2\sub\\', name => 'File2.txt', id => 'Reference2'}, {path => 'E:\Source3\sub2\\', name => 'File3.xml', id => 'Reference3'}, {path => 'C:\Source4\\', name => 'File4.pgp', id => 'Reference4'}, ); my $to = "Z:\\Processing\\"; for my $file (@files) { print "Move '$file->{path}$file->{name}' to '$to$file->{name}' ref $file->{id}'\n"; } #### Move 'C:\Source1\File1.txt' to 'Z:\Processing\File1.txt' ref Reference1' Move 'D:\Source2\sub\File2.txt' to 'Z:\Processing\File2.txt' ref Reference2' Move 'E:\Source3\sub2\File3.xml' to 'Z:\Processing\File3.xml' ref Reference3' Move 'C:\Source4\File4.pgp' to 'Z:\Processing\File4.pgp' ref Reference4'