in reply to @ Regular expression:

Have you read How do I post a question effectively? and Writeup Formatting Tips, as have already been suggested to you in your previous posts like @ ergular expression and @ Regular Expression? Why are you still appending meaningless '@' to the start of your subject lines? Why are you not wrapping your input in <code> tags? You have already had at least one suggested solution fail because of this (Re: @ ergular expression). We are giving you free, valuable advice. Do you think our time is without value? Read and meditate on http://www.catb.org/~esr/faqs/smart-questions.html. Seriously.

Both your questions are very nearly answered in perlretut. I have given you this link before. Read it. We can help you debug if you post a well-formatted script with input and expected output. What do you mean by "the whole string"? The whole string is already in $row - so store that. And what have you tried for question 2?