To help resolve your 2nd question about 2 processes...here is the general thought...
If 2 processes or more trying to access same file either you have to implement synchronization concept or threading concept means one process should complete then only you have to allow other to get access to a file...because both processes needs to access same file. find below some links which may shed you some idea on this...
http://www.xav.com/perl/lib/Pod/perlthrtut.html
http://www.globalspin.com/thebook/chapter20.html
http://perldoc.perl.org/perlthrtut.html