Re: Perl Sockets Communications

2008-04-28 Thread John W. Krahn
Richard Luckhurst wrote: Hi List Hello, I have just been given the task of finding out why a perl sockets listener application we have is no longer working correctly. The application was written back in 2002 and I am told worked fine until we were forced to install a new server early this yea

perl -MCPAN -e shell failed

2008-04-28 Thread Richard Lee
after freshelly installing fedora 9(which is preview version) and which has perl 5.10 fails command line perl module install. Granted that it means I don't have cpan.pm module, how come it didn't come w/ it by default or did I do something wrong? also, searching for CPAN.pm on cpan.org comes up

Perl Sockets Communications

2008-04-28 Thread Richard Luckhurst
Hi List I have just been given the task of finding out why a perl sockets listener application we have is no longer working correctly. The application was written back in 2002 and I am told worked fine until we were forced to install a new server early this year. I have no idea what version of per

Re: hash return from a sub

2008-04-28 Thread Gunnar Hjalmarsson
Flyzone wrote: How can i return a copy of the hash? (The hash is build correct, but return alsways null) Here a sample of my code: sub mysub { while (.) { var1 = ; var2 = ; $myhash{$var1} = $var2; } print %myhash; # all ok until here return

Re: hash return from a sub

2008-04-28 Thread Rob Dixon
Flyzone wrote: > How can i return a copy of the hash? (The hash is build correct, but > return alsways null) > Here a sample of my code: > > sub mysub { > while (.) { > var1 = ; > var2 = ; > $myhash{$var1} = $var2; > } > print %myhash; # all ok un

RE: sql and perl

2008-04-28 Thread Andrew Curry
-Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: 28 April 2008 17:53 To: beginners@perl.org Cc: Francisco Valladolid Subject: Re: sql and perl Francisco Valladolid wrote: >> >> I want to start learning about sql and how it interacts w/ perl. >> >> My rough idea is to

RE: hash return from a sub

2008-04-28 Thread Andrew Curry
Ill make a guess it's a scope issue, but cant be sure without the main code. Try something like use strict; my %test=mysub(); print %test; sub mysub { my(%myhash,$var1,$var2); $var1 = '1'; $var2 = '2'; $myhash{$var1} = $var2; print %myhash; return ( %myhash

hash return from a sub

2008-04-28 Thread Flyzone
How can i return a copy of the hash? (The hash is build correct, but return alsways null) Here a sample of my code: sub mysub { while (.) { var1 = ; var2 = ; $myhash{$var1} = $var2; } print %myhash; # all ok until here return ( %myhash ); } %

Re: web scraping

2008-04-28 Thread Octavian Rasnita
First search with search.cpan.org for "Finance" without quotes and see if you can't find a module that downloads the data you want, and if you don't, you can use LWP::UserAgent or WWW::Mechanize and regular expressions to do it. A very simple example that gets the title of Google's page: use LWP

RE: Info from flat file

2008-04-28 Thread Rob Benton
On your question about $/, the answer is yes. That's why it's always recommended you modify that variable inside an anonymous block like this: { local $/ = "+===+\n"; # read your file } Look at this page and search for "$/". http://perldoc.perl.org/perlvar.html Manoj <[EMAIL PRO

Re: sql and perl

2008-04-28 Thread Rob Dixon
Bob McConnell wrote: > ---Original Message- > From: Rob Dixon [mailto:[EMAIL PROTECTED] >>> I Recommended using PostgreSQL over MySQL, if you need >>> begin, postgresql is the best choice. >> That is a divisive comment, and a matter of opinion. What it >> really boils down to is that Postgre

RE: sql and perl

2008-04-28 Thread Bob McConnell
---Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] >> >> I Recommended using PostgreSQL over MySQL, if you need >> begin, postgresql is the best choice. > > That is a divisive comment, and a matter of opinion. What it > really boils down to is that PostgreSQL is better-featured

Re: perl head and tail command ?

2008-04-28 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Richard Lee wrote: when you are doing it to filehandle vs array, which consumes more memory? my source file is about 100,000 lines... open my $source, 'tmp/server.txt' or die !$; VS tie my @file, 'Tie::File', '/tmp/server.txt' or die $!; Neither of them use any significant

RE: Info from flat file

2008-04-28 Thread Manoj
I also wanted to fetch the first line after the $/ from the beginning. The line Domain : perl.com should be printed along with the while processing. +=+ Domain : perl.com -Original Message- From: Manoj [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2008 1:02

Re: web scraping

2008-04-28 Thread Rob Dixon
Alex Goor wrote: > I was hoping to write a simple program (if that's possible) to open a > browser, go to a site, and scrape a piece of information from that > site. > > For example, I was hoping to open a Safari of Firefox browser, go to > nyt.com and scrape the Dow Jones Industrial Average which

Re: perl head and tail command ?

2008-04-28 Thread Rob Dixon
Richard Lee wrote: > Rob Dixon wrote: >> Richard Lee wrote: >> >>> I would imagine linux's head command can be replaced w/ chop >>> I asked this because I have a filehandle which was, >>> >>> open $source, '/tmp/server.txt' ( and no doing head -1 /tmp/server.txt >>> is not an option since I n

Re: perl head and tail command ?

2008-04-28 Thread Richard Lee
Rob Dixon wrote: Richard Lee wrote: I would imagine linux's head command can be replaced w/ chop I asked this because I have a filehandle which was, open $source, '/tmp/server.txt' ( and no doing head -1 /tmp/server.txt is not an option since I need to go through some other stuff before

web scraping

2008-04-28 Thread Alex Goor
I was hoping to write a simple program (if that's possible) to open a browser, go to a site, and scrape a piece of information from that site. For example, I was hoping to open a Safari of Firefox browser, go to nyt.com and scrape the Dow Jones Industrial Average which is on the homepage. Does

Re: perl head and tail command ?

2008-04-28 Thread Rob Dixon
Richard Lee wrote: > > I would imagine linux's head command can be replaced w/ chop > I asked this because I have a filehandle which was, > > open $source, '/tmp/server.txt' ( and no doing head -1 /tmp/server.txt > is not an option since I need to go through some other stuff > before i need to

perl head and tail command ?

2008-04-28 Thread Richard Lee
I would imagine linux's head command can be replaced w/ chop I asked this because I have a filehandle which was, open $source, '/tmp/server.txt' ( and no doing head -1 /tmp/server.txt is not an option since I need to go through some other stuff before i need to issue below command ) and I wa

Re: Windows Mail

2008-04-28 Thread Rob Dixon
dathome wrote: > > Does anyone have example scripts to work with Windows Mail and in > particular with usenet groups? I want to build a spam filter to run > on all the groups I am subscribed to. It is a little late to run a spam filter once the mail has reached your email client. I am unfamili

Re: sql and perl

2008-04-28 Thread Rob Dixon
Francisco Valladolid wrote: >> >> I want to start learning about sql and how it interacts w/ perl. >> >> My rough idea is to install mysql server and read some books to start >> playing w/ it along w/ perl. >> Any advice? >> >> For now, I just plan to go through the book 'mysql and perl for the >>

Re: sql and perl

2008-04-28 Thread Francisco Valladolid
Hi Richard I Recommended using PostgreSQL over MySQL, if you need begin, postgresql is the best choice. Now, if you need do basic things in SQL, then use SQLite (it no need a working daemon), it is simple and functional. You need the DBI mechanism installed in you computer, followed by the corre

Re: sql and perl

2008-04-28 Thread Richard Lee
Dr.Ruud wrote: Richard Lee schreef: Your posting is a reply to a posting that it has nothing to do with. Next time just start fresh. I want to start learning about sql and how it interacts w/ perl. My rough idea is to install mysql server and read some books to start playing w/ it along w

Windows Mail

2008-04-28 Thread dathome
Hi. Does anyone have example scripts to work with Windows Mail and in particular with usenet groups? I want to build a spam filter to run on all the groups I am subscribed to. DaveN -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.pe

Re: Getting error - Global signal requires explicit package name

2008-04-28 Thread Rob Dixon
hotkitty wrote: > I'm trying to extract links from a website but get the following > error: > > Global symbol "%Config" requires explicit package name at C:/Perl/lib/ > Errno.pm l > ine 11. > Global symbol "%Config" requires explicit package name at C:/Perl/lib/ > Errno.pm l > ine 11. > Global sym

Re: Following links: What's wrong with me????

2008-04-28 Thread Rob Dixon
Rob Dixon wrote: > > WWW::Mechanize is a subclass of LWP::Useragent Apologies - that should be LWP::UserAgent Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Following links: What's wrong with me????

2008-04-28 Thread Rob Dixon
Li, Jialin wrote: > > On Sun, Apr 27, 2008 at 7:28 AM, J. Peng <[EMAIL PROTECTED]> wrote: >> >> On Sun, Apr 27, 2008 at 2:52 AM, hotkitty <[EMAIL PROTECTED]> wrote: >>> >>> This is my first experience w/ PERL and I've searched everywhere but >>> haven't found the answer. As an example, how do I s

Re: sql and perl

2008-04-28 Thread Daniel Kasak
On Sat, 2008-04-26 at 23:24 -0400, Richard Lee wrote: > Hello guys, > > I want to start learning about sql and how it interacts w/ perl. Great :) If you want to create nice GUI apps that talk to databases, check out my projects at: http://entropy.homelinux.org/axis Dan -- To unsubscribe, e-m

Re: sql and perl

2008-04-28 Thread Rob Dixon
Dr.Ruud wrote: > > Your posting is a reply to a posting that it has nothing to do with. > Next time just start fresh. Yes indeed. It may seem like a simple way to make a new post to the group, but if you start by creating a reply and emptying the content, those of us with email clients that disp

Re: sql and perl

2008-04-28 Thread Dr.Ruud
Richard Lee schreef: Your posting is a reply to a posting that it has nothing to do with. Next time just start fresh. > I want to start learning about sql and how it interacts w/ perl. > > My rough idea is to install mysql server and read some books to start > playing w/ it along w/ perl. > Any