Hi all I am trying to do something in Perl and looking for a bit of advice or a point in the right direction. I have not done hardly any Perl before so be gentle

I have a file that has list of numbers in these number relate to a website so page for example http://testsite.com?name= NUMBERPART

I need to loop through the file and for each one go to the webpage and do a grep on it for another key number.

is there a way to do this without download each page ? If I was doing this by command line i would do wget website wait for it to download then do a cat websitename | grep keyword is there way to do it as one command ?

By "without download each page" you mean not writing to a file on disk the page and instead keep the contents in a variable? Yes you can, the same way you can with wget (you can dump the page to STDOUT). Check the LWP library, maybe there are many more, it's been a while since I used Perl.

ok need some more help with perl I have a long list of URL like 15 and I want to search the list for a certain link once I have that link I want store it in a variable. Sometime the URL list contains more than one URL I need but they both have MS:MS then a number. Is there a way to grab the URL using regular I thought I could do this or something simular.

m/^/MS:MS/*$\d

The syntax is not correct but just wanted to know if that would work so I grab at the start the MS:MS and at then end look for a digit.

Certainly you can. Perl is a very powerful language for text processing. If you have your list of URLs in a file, you can load all the contents into an array in a single operation an then traverse the array looking for an array that matches your RE, or you can can read your file line by line and compare it to the RE. You can even extract the specific part you are interested on (the number) from the string when you are comparing against your RE. Be careful how you use the ^ and $.

This is in a loop so for each iteration I get around 15 url I need a way to get the first line and get all the number from it that start with MS:MS then store what it finds in variable so by the end of the loop i should have a list of MS:MS number.

I have tried so many things and think I am getting the syntax wrong as nothing is working. So if you could give me an example that would be cool thanks

I need to search the list of URL for a certain word that starts with MS:MS and end in number for example MS:MS00-000 I need to grab that number and store it in another variable. So the time the loops has done I should have a list of lots MS:MS numbers.

If you already have the list of URLs, then it's only matter of comparing your var against a pattern (your regular expression). In Perl the =~ operator is the one you'll use. You can use a capturing group (parentheses operators) to get your number into a var. I hope you're following me