A man who was caught with a haul of child pornography told police he felt sorry for the victims in the images.
Hugh Caldwell was caught with almost 65,000 pictures and videos of children including some rated amongst the worst seen by specialist police officers.
The 31-year-old admitted downloading the images over a six-year period, when he appeared at Perth Sheriff Court.
He was placed on the sex offenders register and will be sentenced next month.
He admitted possessing 64,367 indecent images of children and 30 child porn videos at his parents' home in Perth between 15 October 2003 and 15 October last year.
Caldwell was caught with the material when officers acting on a tip-off carried out a raid at his family home.
Fiscal depute Alan Kempton told the court: "As a result of information received by the police they obtained a search warrant for the house then occupied by the police.
"The police told him the visit was in relation to indecent images and he replied: 'Yes, that will be me. It's just myself, my computer.'
"He admitted that images of children would be found on his computer. The bulk were at level one, but 131 images and one video were at level five."
Caldwell told police: "I wish none of this had ever happened. I am very sorry for the people in the photos and for the people I have let down."
Sheriff Robert McCreadie granted Caldwell bail and deferred sentence for the preparation of reports until 16 September.