in reply to Re^2: how to shorten given string?
in thread how to shorten given string?

What if i want to do it with regexp, is there a way to do it like that?
What if I was given a perfectly good working solution, and then I said "No, I want to do it some other way"? Would people think I was asking a homework question? Maybe. Maybe not.

In any event, if this wasn't a homework question, you should have given more background about why substr didn't suffice, so that we know why you rejected that solution.

And it looks like I'm not the only one who wonders this.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.