Welcome to the desert of the real. -Morpheus (The Matrix)
As a DM, I have found that there is something missing in the rules to cover that gut feeling or instinct that seasoned warriors or adventurers would develop over time. We read about it all the time in novels but it doesn't translate well into the game. One of the most difficult problems in 1st and 2nd edition AD&D is the illusion. Yes, a character may save vs. spells and detect the illusion but only if they disbelieve what they see before them. This leads to a whole bunch of people wandering through a dungeon saying "I disbelieve!" as if the mere proclamation was a ward against evil. One might think that the seasoned Mage might notice that the Lich's robe do not move in the wind or the thief might have a gut feeling there is a trap on this chest that is beyond his skills.
Hence, I developed the ability called Perception. Perception is the ability to pick up on subtle clues and hints that your character might see but you as players would not. Little things like the skin colour being wrong in an illusion of an Umber Hulk or a slight shimmer in the image before you. The use of the perception ability is not limited to illusions, but can also be used by the DM and the player characters to deal with invisibility, detecting magic in items found, ambushes, traps and many other situations.
Perception is worked out by ((INT+WIS+CHR)/3) -3. The perception check is rolled against on a d20. Why Charisma? Charisma is a measure of a character's self-confidence and leadership. Perception is not only the ability to see what is or isn't there but the confidence to know something is wrong. Example: Bob has an intelligence of 9, wisdom of 7 and a charisma of 17 (Bob's a hunka hunka burning love, but not too bright). His perception would be 8. (33/3 is 11, -3 is 8) To score success on a perception check he needs a roll of 8 or lower. Perception checks are a low roll, but if you like to play with high rolls only the formula would be simply done by (20-(INT+WIS+CHR)/3)) -3.
Perception is usually called for by the player but can be requested by the DM depending upon the situation. A perception check can only be done once in a given area, limits determined by the DM. Example: Bob picks up a dagger. The Player requests a perception check for Bob based on his hopes that the dagger is magical. He rolls a 7 and the DM tells Bob the dagger is lighter than you expect and has a nice edge. Bob pockets the dagger and examines the rest of the room. Bob feels he is missing something so he requests a perception roll. The DM tells Bob that he has already made a perception check in this room and can not perceive anything else wrong.
The important part with perception checks is that it is only a vague feeling, not an identify spell. The DM should not give away any specific details, instead a general sense of danger, or caution. Perception is not a substitute for a saving throw either. If a character perceives the illusion, they still have to save vs. spell. If they failed then the character did not have the confidence to act upon his perceptions. Example: Bob enters the room and is immediately attacked by an Ogre. The Player wonders why an Ogre is in the highest room of the tallest tower and requests a Perception check. Bob rolls a 2 and the Dm informs him that there is evil magic within this room, he can feel it in his bones and there is something about the ogre that seems wrong. Bob must now decide if it is an illusion, a doppelganger, a polymorphed princess or something else entirely.
Depending on the scenario before the party, the perception check can be modified based on the abilities of the character. The bonus for high scores in these abilities would be: 15 to 16 get +1, 16 to 17 get +2, 18 to 19 get +3 and over 20 would get +4. With illusions, mind based magic, and magic traps you would use the wisdom bonus. For detecting if an item is magical use Intelligence. In a situation of a character being conned or bluffed, then you'd use Charisma. As an optional rule, you may give a character +1 on their perception for every 5 levels that they attain. This reflects their experience and "seasonedness" over the years of adventuring. Another bonus that can be given is when a player uses Perception particularly well in a gaming session. Much like granting bonus experience points, an additional +1 to perception could be rewarded if a player role-played the ability in an original style. Perception should never go higher than 16 or it is no longer an instinct but a "danger" detector. I put this as an optional rule because it can make the score quite high and it can be argued that perception is an innate ability not a learned one. I leave it up to you.
Thanks to Roger (Alacrity) Briant for this contribution!