in reply to Moving Files

Well, it's as easy to place a file in DIR1 as it is in DIR2. Just use the path name (either absolute or relative) when opening the file you generate. There's no point in putting the file in DIR1 first and then move it into DIR2, unless there are some non-perl reasons for it.
open my $fh, ">", "/whatever/path/you/need/Main/DIR2/file" or die; # +Absolute open my $fh, ">", "../DIR2" or die; # Relative
As for question 2, I'd most likely use "system", although opening a pipe or a fork/exec might be appropriate as well.