in reply to How to find a string after matching a Keyword
Try an @array instead or call it in a loop in scalar context (ie grabbing with $1)
Furthermore it seems like a \s+ is missing where you test for whitespace.
Cheers Rolf
PS: Je suis Charlie!