Was there a slip nut and washer on this pipe or did it just seem to go into the wall with out anything holding it in place? A picture would be helpful. If there was s slip nut and washer you just have to get under the piece of pipe with a strong screw driver and try to fold it on itself. If it did not have the slip nut it is likely you have a solder fitting in place. Back in the 50's and 60's they screwed in this bushing that allowed the plumber to solder the quarter bend of the p-trap in place. If that is the case get a hacksaw blade and cut the bushing out.