Answer:
First, two lines are perpendicular if one has slope m, and the other has slope -1/m (Not 1m as Alan says)
That is the first error of Alan.
Now, there is another error.
If m = 0, then -1/m tends to minus infinity (in this case we would have a vertical line).
But we can not really divide by zero, so we should state that:
m can not be zero, if a line is horizontal, the perpendicular line must be vertical.