I've been using Mathematica for many years, and suddenly this very basic issue crops up. Why do the first and second inputs evaluate correctly but the third doesn't?
 
In[114]:= 
Select[{1, 2, 3, 4, 5}, # > 2 &]
Select[{1, 2, 3, 4, 5}, # > xx & /. xx -> 2]
Select[{1, 2, 3, 4, 5}, # > xx &] /. xx -> 2
Out[114]= {3, 4, 5}
Out[115]= {3, 4, 5}
Out[116]= {}