This is the classic example of knowing that a trap is there, because the GM asked for a perception check. The obvious solution to this is to not ask for a perception check, unless the player declares an action first. When the players enter a corridor that contains a trap, I'll foreshadow the trap first with the description of the corridor. This is the most important part. Something may seem off to them, such as unusual drag marks on the floor, or a blood stain on the wall. This will prompt the players to be suspicious, but they don't yet know of what. It might be a trap, but it doesn't have to be. They will need to investigate to find out. It motivates the players and their characters to take an action to find whatever is there. As they declare an action to search the walls and floors, that is when I call for a perception check.
The foreshadowing is very important. It means that players never have to search every corridor they go through, because I always give them a clue when something is amiss.
Now, if they roll low, they still don't know that they missed a trap. They just know that they failed to find whatever might be there, based on my description. But they would get the same outcome if the GM rolled instead, because it would be the same description of the situation either way. The players don't have to pretend that the corridor is safe just because they didn't find anything. I already gave both the players and their characters enough reason to suspect danger and they are allowed to act on it. Meta knowledge thus becomes a none-issue.
I don't give my players false information when they fail their roll. If they are looking for a trap, and don't roll high enough, I tell them that they were unable to find anything. I don't tell them there is no trap, because there is, but they simply were unable to find it.