like is a preposition. It takes a noun as its object,
ex: They swim like fish.
 as is a conjunction. It joins two clauses,
ex: Do as I say, not as I do.
Hint: When in doubt, look for a pair. If you find a subject-verb pair, use "as"; if you don't find a subject-verb pair, use "like":
ex: When in Rome, do as the Romans do.
ex: When in Rome, do like the Romans do.
Note that, in American English, it is common to use like instead of as in this way, but it's not normally thought to be correct in formal English.
Read more ...