print $outputfile "$parsedstring\n" or warn "couldnot write to $inpfile: $!";