A judge has issued a warning about the potential dangers for children in online chatrooms.
Sharkey groomed his teenage victims over the internet
Lord Reed said that they were being targeted by predatory and manipulative older men.
The judge made his comments as he sentenced 33-year-old Robert Sharkey to 10 years in prison for carrying out serious sexual assaults on two girls.
Sharkey lured the pair to meetings by posing as a teenage boy on the net, the High Court in Edinburgh heard.
Lord Reed told Sharkey: "This case underlines the dangers of internet chatrooms for teenagers.
"Young people using teenage chatrooms need to be aware that these chatrooms are targeted by older men who are predatory and manipulative.
"They need to be aware of the risk and take care before revealing personal details or arranging to meet people in that way," he added.
The judge said that shaven-headed Sharkey was "a man with a perverted sexual interest in children".
Sharkey, of Crookedholm, Kilmarnock, in Ayrshire, groomed his teenage victims over the internet and even sent a photo of a teenage boy as he arranged to meet them before indecently assaulting them.
When police went to question Sharkey they seized his computer and found that he had amassed scores of indecent photographs of young girls.
The court heard that 59 of 329 photos found were sent to an expert who said that 30 of them were of girls under the age of 16.
Sharkey also distributed and showed his porn collection in a series of e-mails.
The judge said children must exercise care
Lord Reed told Sharkey, who has previous convictions for assaults, that he had been assessed as posing a high risk of reoffending.
He said that in sentencing the predator he took into account the serious nature of the sex attacks on the two girls.
Lord Reed said that as a further measure to protect the public he would order that Sharkey face a further four years when he will be kept under supervision and can be returned to prison.
Sharkey had earlier admitting possessing and distributing indecent photos of children at his home in January and February last year.
Lord Reed jailed Sharkey for eight years for the sex attacks and a further two years for the child pornography offences.
Sharkey was placed on the sex offenders' register following his conviction.