in reply to error trapping problem

perldoc perlopen
perldoc perlipc