http://qs321.pair.com?node_id=798291


in reply to Avoid multiple process writing to a file at the same time

Please read perldoc perlfaq5