A characterization of PGL(2,q), q odd