assuming p is pointing away from wire..
E on -q = λ(-q)/2PIε0r
dE=+λqdr/(2πε0r2)
E on +q = -E+dE ..(charge on +q is oppsite of -q so -E..)
net force on dipole =dE
λ(qdr)/(2πε0r2)
qdr=P
=λ(P)/(2πε0r2)... attractive ...(as assumed -q is nearer)