Naming Convention?

2005-01-21 Thread Graeme St. Clair
Is there any common convention governing names of variables defined in a 'require'd 'blah.pl'? I'd like to make use of such variables detectable to the naked eye in the scripts that 'require blah.pl'. Rgds, GStC.

Re: Testing the first line of a file

2005-01-21 Thread Randy W. Sims
David Gilden wrote: Greetings, I was looking for a way to improve the following: # Check to make sure it is an inTune File open (FH, UPLOAD_DIR . "/$file") || error( $q, "Error reading $file for test : $!" ); while(){ if ($_ !~ /\*{5} InTune/){ unlink( UPLOAD_DIR . "/$file") or error( $q,

Testing the first line of a file

2005-01-21 Thread David Gilden
Greetings, I was looking for a way to improve the following: # Check to make sure it is an inTune File open (FH, UPLOAD_DIR . "/$file") || error( $q, "Error reading $file for test : $!" ); while(){ if ($_ !~ /\*{5} InTune/){ unlink( UPLOAD_DIR . "/$file") or error( $q, "Problem deleting

Specifying tag attributes in TokeParser

2005-01-21 Thread Dan Armstrong
I am trying to strip zip codes out of a table which looks like this: 10001 NY 212 NEW YORK 40.7496 -73.9971 The zip code is between the tags and . Now, the code below outputs all text inside all pairs: use HTML::TokeParser; my $file = shift; my $p =

Fork resetting file descriptors

2005-01-21 Thread Tham, Philip
I was opening a html document using the function my $stream = HTML::TokeParser->new($filename) || die "Couldn't read HTML file $filename: $!"; while ($token=$stream->get_token()){ While processing the tokens I am forking child processes. At some point in the process the variable $stre

Re: Benchmarking a sort with array reference problem

2005-01-21 Thread John W. Krahn
Edward Wijaya wrote: Hi, Hello, I am trying to benchmark these two sorting algorithms. However running the script below: $ perl thiscode.pl gives: Can't use an undefined value as an ARRAY reference at radix.pl line 23. However the code execute smoothly with the normal usage. Only when I use 'cmpthe

Re: Module to work like a google engine index

2005-01-21 Thread Dave Gray
> I would like to know if any one knows a perl module, which working like a > index engine, on text documents or PDF documents or Word documents (like > google to desktop, ou lucene API). It's not a module, but Glimpse can do what you describe. -- To unsubscribe,

Re: PERL with grep

2005-01-21 Thread Dave Gray
> I would like the script to do the following: > 1) List all *.java files containing following patterns: >double, parseDouble Sounds to me like you don't need to resort to perl yet with this problem... egrep -rHis '\bdouble\b|\bparsedouble\b' /path/to/dir/ -- To unsubscribe, e-mail: [EMAIL

Benchmarking a sort with array reference problem

2005-01-21 Thread Edward Wijaya
Hi, I am trying to benchmark these two sorting algorithms. However running the script below: $ perl thiscode.pl gives: Can't use an undefined value as an ARRAY reference at radix.pl line 23. However the code execute smoothly with the normal usage. Only when I use 'cmpthese' the problem occur. Any i

Re: Geo::PostalCode

2005-01-21 Thread Jay
> I love Geo::PostalCode. Did you read the INSTALL file? From the docs, notice > the lwp-download, gunzip, and ./load.pl calls BEFORE perl Makefile.PL is > executed: > > To install, run > > lwp-download http://tjmather.com/Geo-PostalCode_19991101.txt.gz > gunzip Geo-PostalCode_19991101.txt.gz >

RE: More elegant solution for a date conversion

2005-01-21 Thread Charles K. Clarkson
Jason Balicki <[EMAIL PROTECTED]> wrote: : Charles K. Clarkson wrote: : : $retdate should NOT be in quotes. : : What are the consequences of putting it in quotes? perlfaq4: What's wrong with always quoting "$vars"? : Every place I print in the rest of the script

RE: More elegant solution for a date conversion

2005-01-21 Thread Jason Balicki
Charles K. Clarkson wrote: [snip] > > You have $locdate scoped to the sub and all the other scoped > outside the sub. That's the "my" bit, right? Filed. Thanks. > You are also printing the new date into the log > instead of just returning the new date which is im

RE: More elegant solution for a date conversion

2005-01-21 Thread Charles K. Clarkson
Jason Balicki <[EMAIL PROTECTED]> wrote: : I've got a phone record that keeps the date and time in the : following format: : : YYMMDDHHMM : example: 0501201500 : : So, I've written the following to convert it to the format: : : MM/DD/,HH:MM : example: 01/20/2005,15:00

RE: Extracting and email address

2005-01-21 Thread brian . barto
Oh come now. Maybe he's writing an auto-responder. ;) Besides, these days, if he is spamming he can look forward to lots of fines and possible prison time. -Original Message- From: Edward Wijaya [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 6:10 PM To: Andrew Black; beginners@

Re: More elegant solution for a date conversion

2005-01-21 Thread Scott R. Godin
Todd W wrote: "Jason Balicki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I've got a phone record that keeps the date and time in the following format: YYMMDDHHMM example: 0501201500 So, I've written the following to convert it to the format: MM/DD/,HH:MM

linked list

2005-01-21 Thread Christian Stalp
Hello again, I still have some questions concerning the linked list. The problem now is, that I try to access the head-pointer of the list after I left the loop in which the list were made. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use constant NEXT => 0; use constant VAL =>

Re: Extracting and email address

2005-01-21 Thread Edward Wijaya
On Fri, 21 Jan 2005 10:47:33 +, Andrew Black <[EMAIL PROTECTED]> wrote: Is there a module to extract the real email address from a header. e.g. Yes there is "Email::Find" Why would you want to extract email addresses? Spamming? -- Edward WIJAYA Singapore -- To unsubscribe, e-mail: [EMAIL PR

Re: Extracting and email address

2005-01-21 Thread Dmitry Nikolayev
Of course, you can make the same with your example: my @addresses = Mail::Address->parse('"blah blach" <[EMAIL PROTECTED]>'); print $addresses[0]; The result should be: [EMAIL PROTECTED] With best wishes, Dmitry Nikolayev "Andrew Black" <[EMAIL PROTECTED]> ???/ ? ???

Re: Extracting and email address

2005-01-21 Thread Dmitry Nikolayev
Mail::Address is the module you're searching for, I hope.. my @addresses = Mail::Address->parse($head->get('To')); $head is a header object, as you understood With best wishes, Dmitry Nikolayev "Andrew Black" <[EMAIL PROTECTED]> ???/ ? ?: news:[EMAIL PROTECTED]

Re: Extracting and email address

2005-01-21 Thread Ing. Branislav Gerzo
Andrew Black [AB], on Friday, January 21, 2005 at 10:47 (+) made these points: AB> Is there a module to extract the real email address from a header. e.g. AB> given AB> "blah blach" <[EMAIL PROTECTED]> AB> extracts the [EMAIL PROTECTED] AB> I am loathe to roll my own - sure there are for

Extracting and email address

2005-01-21 Thread Andrew Black
Is there a module to extract the real email address from a header. e.g. given "blah blach" <[EMAIL PROTECTED]> extracts the [EMAIL PROTECTED] I am loathe to roll my own - sure there are formats I haven't thought of. Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: cpan slow ?

2005-01-21 Thread Manav Mathur
Now, Its running fine here too. |-Original Message- |From: Chris Brown [mailto:[EMAIL PROTECTED] |Sent: Friday, January 21, 2005 3:56 PM |To: beginners@perl.org |Subject: Re: cpan slow ? | | |I was having problems (in Peterborough, UK) but it all seems to be |running fine again now. | |

Re: cpan slow ?

2005-01-21 Thread Chris Brown
I was having problems (in Peterborough, UK) but it all seems to be running fine again now. On Friday 21 Jan 2005 09:51, zentara wrote: > On Thu, 20 Jan 2005 23:18:20 +0530, [EMAIL PROTECTED] (Harsh Busa) > wrote: > > >hi > > > >i m trying to connect to search.cpan.org (from india ) and getting

Re: GD module not found using PPM

2005-01-21 Thread Dmitry Nikolayev
Hello! The prob with GD and PPM is maybe you're using perl 5.6(the same prob was with DBD::mysql) from Activestate? I used perl 5.8.4 from them and there were no probs... Try to upgrade perl, if I'm right about your perl version. With best wishes, Dmitry Nikolayev "Mark Cohen" <[EMAIL PROTECTE

Re: Geo::PostalCode

2005-01-21 Thread Todd W
"Jay" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have the following code, which dies "no such file or directory" at > line 8. The problem seems to be that the census data file it relies > on is a single .dbf, and the documentation seems to indicate that the > module looks for

Re: More elegant solution for a date conversion

2005-01-21 Thread Todd W
"Jason Balicki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I've got a phone record that keeps the date and time > in the following format: > > YYMMDDHHMM > example: 0501201500 > > So, I've written the following to convert it to the > format: > > MM/D

RE: Can't locate loadable object for module

2005-01-21 Thread Henry, Mark Patrick
Hi Mark, Thanks.. No that didn't help. I had also previous tried 'shift'ing the same thing onto INC. As you can see below, it does show my added path in the INC array but still no luck.. Cheers, M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, J

Re: GD module not found using PPM

2005-01-21 Thread ewijaya
- Original Message - From: Mark Cohen <[EMAIL PROTECTED]> Date: Friday, January 21, 2005 3:54 pm Subject: GD module not found using PPM > > www.bribs.org/perl/ppmdir.html Your URL has a slight typo mistake, Mark. Below also includes the alternatives: http://www.bribes.org/perl/ppm/ ht