Perceptrons can only learn a limited class of functions.
Output formula for perceptron:
Given the sigmoid function noted previously, the perceptron outputs something close to 1 if the inner product of the weight vector and input vector is greater than zero; otherwise it outputs something close to 0.
So the perceptron is distinguishing inputs based on where they fall with respect to a hyperplane in input space (whose coefficients are the weights). The perceptron will learn correctly iff a hyperplane exists which divides the inputs correctly, i.e. if the function is linearly separable (in each output for perceptron networks).