By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,660 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,660 IT Pros & Developers. It's quick & easy.

How to harness information of the web

P: 15
Hello Everyone,

I am not sure if I posting this to the right forum or not. So, I apologize before hand if this is not the forum for posting this question.

I want a script that would run weather in Windows or Linux that will gather the information of a website and save it in a file (maybe to a .xls file). I want to use a program because I want to search more than 1000s of pages. However, the good thing is that each page is identical to the other. For example, the program browses: http://www.xxxxxx.yyy/1.html and grabs a variable's content from inside and saves it to a file. Next it goes to: http://www.xxxxxx.yyy/2.html and does the same thing.

Can PERL do this?

Thanks
Oct 21 '08 #1
Share this Question
Share on Google+
8 Replies


Icecrack
Expert 100+
P: 174
simple answer yes, and you must attempt this on your own before we can help you, if you would like us to show you the right direction in learning perl we can.
Oct 21 '08 #2

KevinADC
Expert 2.5K+
P: 4,059
What is weather? Is that a Windows application or a third party application? Does it fetch the webpages?
Oct 21 '08 #3

P: 15
"weather" is an excessive word in that sentence. Please ignore it and sorry for the confusion.
Oct 21 '08 #4

eWish
Expert 100+
P: 971
scriptx,

When you have a general question for various programming languages, please post it in the Miscellaneous Questions Forum rather than posting your same question in 4 different programming forums.

Thank You,

Kevin
Moderator
Oct 22 '08 #5

P: 15
All right let's do this :) I know there would be a lot to learn and I have already done some reading on wikipedia. I know a bit of C so this shouldn't be too hard.

I am trying this and I get errors:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. print "Hello, world!\n";

This is running in CentOS environment and Perl 5.8.X is installed.

Thanks
Oct 22 '08 #6

eWish
Expert 100+
P: 971
Are you trying to view this via web browser? If so, you must first print the proper headers.

Expand|Select|Wrap|Line Numbers
  1. #! /usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. print "Content-type:text/html\n\n";
  7. print 'Hello World';
I would suggest that you get or read the book "Learning Perl" or "Beginning Perl", both are a great resource for beginners.

Last, but not least. Always use the [code][/code] tags when posting code samples here at Bytes.com

--Kevin
Oct 22 '08 #7

P: 15
Thanks for the suggestions. I am simply trying to compile (is that possible with Perl?) foo.pl in CentOS. I tried: perlcc foo.pl and it fails. I am not using a web browser. I only need to do this in Linux environment.
Oct 22 '08 #8

numberwhun
Expert Mod 2.5K+
P: 3,503
Thanks for the suggestions. I am simply trying to compile (is that possible with Perl?) foo.pl in CentOS. I tried: perlcc foo.pl and it fails. I am not using a web browser. I only need to do this in Linux environment.
What is your need for compiling it? I have never used perlcc, but another you could try is perl2exe. Converting to binary would only really be needed if you are distributing the script to clients and don't want your code "stolen" or copied. If not, why do it?

Regards,

Jeff
Oct 22 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.