perror doesn't just print to standard error, it prints what you pass to it and appends some error message determined by errno, separated by ": " and puts "\n" at the end. In most cases, this will work for us I think, we just need to make sure not to put "\n" at the end of our arguments, so that we don't have errors printed on two lines and review what we pass in to make sure it makes sense with the error messages.
perror doesn't just print to standard error, it prints what you pass to it and appends some error message determined by errno, separated by ": " and puts "\n" at the end. In most cases, this will work for us I think, we just need to make sure not to put "\n" at the end of our arguments, so that we don't have errors printed on two lines and review what we pass in to make sure it makes sense with the error messages.