467,201 Members | 1,039 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,201 developers. It's quick & easy.

How to harness information of the web

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
  • viewed: 1209
Share:
8 Replies
Icecrack
Expert 100+
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 2GB
What is weather? Is that a Windows application or a third party application? Does it fetch the webpages?
Oct 21 '08 #3
"weather" is an excessive word in that sentence. Please ignore it and sorry for the confusion.
Oct 21 '08 #4
eWish
Expert 512MB
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
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 512MB
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
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 2GB
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.

Similar topics

8 posts views Thread by Raquel | last post: by
2 posts views Thread by Vai2000 | last post: by
6 posts views Thread by Ian Williamson | last post: by
1 post views Thread by Tarun Mistry | last post: by
reply views Thread by Derek | last post: by
10 posts views Thread by =?Utf-8?B?SmFtZXMgV29uZw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.