Joining two strings by matching positions of an alphabet in both strings in Perl

Can't Post

I need a Perl script where a string get fragmented at every occurrence of 'E' and when user enters positions of 'C' through command line (say 3-8 or 3-8,13-18 or any comma separated such positions of 'C' according to the string in such format if the string is long), the fragments containing 'C' (say at 3 and 8 positions) should be joined and shown in the output.

Suppose string is "ABCDEABCDEABCDEABCDEABCDE" and user enters 3-8 then program oputput should be-