in reply to Re^4: string problem
in thread string problem

You split already extracts those, it's just a matter of chosing the right elements from the returned lists.

You do know how to get elements from a list, don't you?

See perlintro and perldata.