Defense attorney D. Scott Perrine paid a visit to a Northeast Philadelphia prison on Wednesday and ended up behind bars himself when guards found a small amount of cocaine in his briefcase.

Law-enforcement sources said Perrine, a former assistant district attorney, presented a visitor's pass and his identification after he entered Curran-Fromhold Correctional Facility, on State Road near Rhawn Street.

A guard searched Perrine's briefcase and found a small tinted vial that contained a powdery substance, and a field test indicated that it was in fact cocaine.

Perrine, 29, was charged with carrying contraband, a second-degree felony, and being in possession of a controlled substance, which is a misdemeanor, sources said.

He was released on his own recognizance yesterday afternoon after spending the previous night in a holding cell at the 15th District, Harbison Avenue and Levick Street.

Perrine last night described the incident as a misunderstanding.

Before visiting Curran-Fromhold, "I had a meeting with a client and his mother, and she had brought out [the vial] to demonstrate what she has to put up with," Perrine said.

"There was nothing really in it at all, and that vial is what was found in my briefcase."

Perrine's attorney, Larry Krasner, said there were .001 grams of cocaine in the vial - roughly 1 percent of the normal amount of cocaine that would be sold in the type of vial found in Perrine's briefcase. Police officials confirmed that the amount of cocaine in the vial was minuscule.

Krasner said the idea that Perrine had been trying to sneak the vial into the prison "really doesn't hold water."

"He's a former assistant district attorney with a good rep. Anyone who thinks he's going to bring into jail something of no cash value . . . is nuts," Krasner said.

District Attorney spokeswoman Cathie Abookire said the case is being referred to the attorney general's office, "because prosecution of Mr. Perrine by this office would create an actual or apparent conflict of interest."

Perrine resigned from the D.A.'s office in July after three years and started his own practice.

"It's frustrating," Perrine said, "but it was an eye-opening experience to see what my clients go through when they're arrested." *