Most likely your data lives in a hyperspace. Say, if you have 4 attributes, then your dataset can lives in a 4 dimensional space, if your 40 attributes are all independent and not merger/transformable/... then your dataset lives in a 40 dimensional space. You can not use lines to separate the different classes because a line has only 2 dimension, you must use hyperplanes. The problem is, a hyperplane is not drawable with a graph.
About the 100% percent accuracy, your understanding is correct. But, in the real world this kind of clear separation is not easy to find. If your data is 100% separable then what you need to do is just pick up a classifier suitable for your dataset's class type (nominal vs numeric) then apply it the classifier algorithms.
The problem is, if your data is a real world data then you have much more work to do.
About your question on how to separate the data if they are not 100% separable, the answer is, don't worry because the tools we have today are not limited to the perceptron. Even SMO can be configured to use kernel in order to be able to separate data which are not 100% linearly separable.
One more thing for your consideration, even if your data can be plotted on a 2D graph plus the different classes are visually found in different agglomerations it doesn't mean that you can always separate them with a line. Take an egg as an example, the yellow part is one class and the white part is another class. Now ask yourself, can you use a chopstick to separate the two classes, i.e. put the yellow in one place and the white in another place? The answer is no, it means that, this kind of data are distinguishable but not linearly separable. But, don't worry, because some scientist has invented the logistic regression to cope with these kind of problems. If the problem is more complex, say multiclass, then you can use the One-vs-All for logistic regression classification.
So, we are very fortune because a lot of scientist have invented a lot of tools for us to cope with a lot of real world data separation problem.
One thing is for sure, you must know the data you have, you must clean them (n.b. data is a plural noun, its corresponding singular form is datum, which very rarely is used), and make them slimmer.
BR,