A convicted sex offender told a court yesterday he was stabbed twice and beaten with a weapon while walking his dog at night.

The High Court in Dundee had heard that a man had been seen earlier in a nearby caravan park, carrying a baseball bat and a knife, and was heard to remark that there was a paedophile in the area that ''needed done''.

Ian Arthur Hunter, 51, said he was attacked by two men. He was giving evidence at the trial of Charles Patrick Duddy, 39, of Craigleith View, Tullibody, Clackmannanshire, who denies assaulting him to severe injury, permanent disfigurement and danger of his life.

Mr Hunter said he had ''absolutely no doubt'' that Mr Duddy was one of two men he saw just before he was attacked on May 7 last year on the Crieff-Dunfermline road.

Mr Duddy approached him and asked him: ''What do you call this place?'' and ''How long have you had that dog?'' Mr Hunter answered ''Glendevon'' and ''three years''. Mr Hunter said the accused turned away from him and began to speak in a ''phoney Irish accent''. Through the gloom Mr Hunter then saw the outline of another figure about 20 or 30 yards away.

Mr Hunter became frightened and turned to go back home, but had the feeling he was being followed.

The next thing he knew was that he had been struck between the eyes by a ''smooth, round object similar to a baseball bat''. At the same time he felt as if another person had driven a ''red hot poker'' into his side.

Mr Hunter was treated for a stab wound in his back and one in his side, a broken nose, a damaged rib and bruising to his face.

Advocate depute Frank Mulholland told Mr Hunter: ''In 1977 you were convicted of lewd practices at Perth Sheriff and jury court.''

Mr Hunter dismissed questions about his sex-offending history as ''irrelevant'', but under pressure from Lord Phillip said he had not been convicted of any other lewd practices since the 1977 incident.

Earlier, police inspector Edward Bell told the court he was told that an Anthony Morgan had said that there was a paedophile in the area that ''needed done'', after he was seen carrying a baseball bat and a knife on the night of the assault.

Inspector Boyle was recalling a conversation he had in confidence with a Mr Albert William Adam at Glendevon caravan park.

The court was told that Mr Adam, who has since died, told the inspector that he saw Mr Morgan carrying the weapons before he (Mr Morgan) made the remark to Mr Duddy and Mr Adam in a caravan.

Mr Thom drew Mr Hunter's attention to the report on an identification parade held 10 days after the incident, when Mr Hunter had picked out Mr Duddy.

The report noted that, when Mr Hunter identified Mr Duddy, he had said: ''I think that's one of them. That's the only one I recognise. I didn't get a good look at them.''

In court, Mr Hunter was adamant that there was ''no doubt whatsoever'' that Mr Duddy was the man who approached him on the night of the assault.

Earlier Mr Morgan, who was also in the parade but was not picked out, was brought into the court. Mr Hunter said he had a ''vague recollection of his face''.

The trial continues.