What have you tried? What didn't work? What resources are you using? This smells a lot like homework. I would say that split is probably a more appropriate tool than regular expressions. For some great resources on learning Perl, see http://learn.perl.org/. And if you post some code as per How do I post a question effectively?, we'll be happy to help you debug.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.