in reply to Few Doubts

  1. I don't know, but you might look at Java.
  2. No idea, sorry.
  3. To get all the matches at once, use
    my @matches = ( $line =~ m/$pattern/g )
    (i.e., use the /g flag and assign the result to an array). If your problem is how to turn $filecontent into $line, then you want split. Howeverdon't write your own regex; that's why we have Regexp::Common. (See Beast of the Number: Parsing the Feral Phone for why it's so scary to try to parse phone numbers.)

P.S. What kind of phone number is 5 digits followed by 6 digits?