looks like compression to me and DD < D!2
:)
Bret
Brian wrote:
>
> On Fri, 3 Mar 2000, ::--Koshy Kerteya--~!~ wrote:
>
> > Hi,
> >
> > Suppose I have a string of "AAAABCCCDD"
> > And I wanna use perl to convert this to A!4BC!3DD
> > what should I do ?
> > Is there a ready function (grep???) to achieve this ?
>
> yes perl can do this.
>
> their is no built in function to just magically transform as you have
> above. It would take a little code. Why is it:
>
> AAAABCCCDD A!4BC!3DD
> and not
> AAAABCCCDD A!4BC!3D!2
>
> I mean if its 1 character, just print it, if its two chars just print it?
> then if its more than 2 do the char!num thing?
>