in reply to Perl Substr

why do you use the same title for a different question?

> Are there any easy ways to implement this function?

yes see split, you'll find plenty of examples there and in the archives

Try to apply hat you learn there and ask again - showing your efforts -if you have problems! =)

Cheers Rolf

( addicted to the Perl Programming Language)