Gidday All, please help with my subroutine sub cleanText{ my $cleanedText = @_; $cleanedText =~ s{<p>}{<p class='bodytext'>}g; $cleanedText =~ s{<b>}{<span class='bodybold'>}g; $cleanedText =~ s{<\/b>}{<\/span>}g; $cleanedText =~ s{<a href}{<a class='bodytext' href}g; return $cleanedText; } This subroutine is used in our cms the idea is to take the editors content and add the appropriate styles etc when I pass it a value it returns 1; e.g $bodyCopy = cleanText('<p>Fittingly, the first student to arrive on the first day at Booligal Public's new era was Steven Spiers.</p> <p>The Year 4 student is the only one who was enrolled at the school before the doors closed in 1999.</p> <p>There were insufficient numbers to continue, as he would have been one of two students enrolling for the Year 2000.</p> <p>The Department of Education and Training maintained the premises as an outpost of the Hay Distance Education Centre, and a teacher visited regularly to work with local students.</p> '); I don't understand? Any help appreciated Regards Colin Johnstone
********************************************************************** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. **********************************************************************