in reply to Few Doubts

Hello, Good day!!!

1. Sorry i have no idea :(

2. Hmmmm...well.., there are a lot of decent modules found in CPAN. I think it should be better if you're going to read perlthrtut and perlothrtut first ^_^

3. As what have JadeNB said, you can use /g flag to get all strings that have matched w/ the pattern.

Example:
#!/usr/local/bin/perl -w use strict; my $str = "12345-112316 string string 11111-222311\n\n 71231-121111"; # assuming '-' is the delimiter my @pnumbers = $str=~/(\d+-\d+)/g; # print print "$_\n" foreach(@pnumbers);

You might want to read perlretut also for better understading of regular expressions (regex)...

Cheers!!!