open (my $readhandle, "<", $filetoread) or die "Unable to read '$filetoread': $!"; open (my $writehandle,"+>", $filetowrite) or die "Unable to write '$filetowrite': $!"; open (my $outputhandle, ">", $fileoutput) or die "Unable to write '$fileoutput': $!";