Scrip to clean Cc in a ticket

Dear RT users,

We have a RT queue that receive new ticket by email sending and with a lot
of junked Cc adresses
I need your help to write a script that delete all Cc addresses on ticket

I started thinking about it and did some tests with the following :

Condition: OnCreate
Action: User Defined

Custom condition: return 1;

Custom action preparation code:

use RT::Ticket;
my $ticket = RT::Ticket->new($CurrentUser);
my $CcList = $ticket->CcAddresses ;

$self->TicketObj->DeleteWatcher(Type=>“Cc”,Email=> “$CcList”);

Custom action cleanup code: return 1;

If someone has an idea to do it, it would really great

Thanks in advance,