Re: Tracking/Blocking IPs.

2005-11-03 Thread Randal L. Schwartz
Sara == Sara [EMAIL PROTECTED] writes: Sara I have been running a public forum (no registration required) Sara with over 50,000 visits per day. There's your mistake. Looks like you'll have to implement a round-trip registration. Of course, if your site is highly visible, expect *that* to be

text/xml

2005-11-03 Thread Dermot Paikkos
Hi, First off apologies if this is OT but I am trying to get my head around something. In the near future I will work with a system that responds with: Content-type: text/xml (\n\n) The idea is to get statistical information from their database and use some GD::Graph (and possibly other

Re: Tracking/Blocking IPs.

2005-11-03 Thread Lukas Fragodt
Sara wrote: I have been running a public forum (no registration required) with over 50,000 visits per day. Lot of Trolls and bad / advertising posts etc from other sites and individuals. If you must allow anonymous posting, consider adding a feature allowing you to selectively disable

max value of an integer scalar

2005-11-03 Thread JeeBee
Dear Perl experts, The following subroutine contains a while loop that continues to multiply $p by 2, until some condition is met. (It's for computing a Collatz tree) $p turns 0 in this loop, however, and it remains zero for ever, of course. My question is, what is exactly its maximum value? As

Re: max value of an integer scalar

2005-11-03 Thread John W. Krahn
JeeBee wrote: Dear Perl experts, Hello, The following subroutine contains a while loop that continues to multiply $p by 2, until some condition is met. (It's for computing a Collatz tree) $p turns 0 in this loop, however, and it remains zero for ever, of course. My question is, what is

Re: max value of an integer scalar

2005-11-03 Thread JeeBee
Thank you, John! I see the limit is 32 bits now. I just added 'use bigint', how easy! Further, I was wondering about why you said I wasn't just multiplying by 2 using $p=1. Isn't it exactly equal to $p*=2 ??? This has anything to do with overflow or the representation of a number? I though

Re: max value of an integer scalar

2005-11-03 Thread Adriano Ferreira
On 11/3/05, JeeBee [EMAIL PROTECTED] wrote: Thank you, John! I see the limit is 32 bits now. I just added 'use bigint', how easy! Further, I was wondering about why you said I wasn't just multiplying by 2 using $p=1. Isn't it exactly equal to $p*=2 ??? It is equal just up to the moment the

regex heck

2005-11-03 Thread Tom Allison
I've been playing with some regex, Benchmark, and 'slurping' and found something that I could do (If I could get it to work) but not sure I want to do it. Benchmark: reading a file using: my $line = do {local $/; $file}; versus; while ($file) { } is ~2x faster on my

What kind of structure to choice

2005-11-03 Thread Gilles
Hi, I would like to create a matrix 9x9 where the elements are list (array). (like a cube) These lists will decrease during processing and will normally contain one element, so to know if a list is definitely treated I need a flag. So 2 solutions seems to be good, but which one do you think

Re: What kind of structure to choice

2005-11-03 Thread Jeff 'japhy' Pinyan
On Nov 3, Gilles said: These lists will decrease during processing and will normally contain one element, so to know if a list is definitely treated I need a flag. Why? You can find the size of an array like so: $size = @array; In the case of an array reference, it's merely $size = @{

What kind of structure to use (continue)

2005-11-03 Thread Gilles
Hi, I just got another idea witch consist to use a continuous array for lines and columns (that is the first element of the second line is at index 9). This array contains always 2 possibilities: array with special value for flag or hash with 2 keys Another idea ? Thanks Gilles

Re: What kind of structure to choice

2005-11-03 Thread Shawn Corey
Gilles wrote: Hi, I would like to create a matrix 9x9 where the elements are list (array). (like a cube) These lists will decrease during processing and will normally contain one element, so to know if a list is definitely treated I need a flag. So 2 solutions seems to be good, but which

Re: max value of an integer scalar

2005-11-03 Thread Shawn Corey
Adriano Ferreira wrote: But the multiplication operator (*) is smarter and does an upgrade from integer to floating point when needed, (possibly) increasing the range of the correct results. Adriano. What JeeBee has stumbled across is a field of study called Numerical Analysis. For a brief

Re: input validation and persistency module for (mod_perl) web apps?

2005-11-03 Thread Marcello
John Doe ha scritto: Dear list members Maybe the perl-module-authors would be the more appropriate list for my question(s), but here are people confronted with the same tasks to solve when programming web applications, so... Some of the tasks always to be solved in an interactive webapp:

Which logger do I want? Or write my own? How?

2005-11-03 Thread Siegfried Heintze
I have a couple of batch jobs that run every couple of hours. They scrape web sites and populate an MSAccess database. I would like to write a GUI to monitor them. Presently all my diagnostic print statements just scroll by and they are very hard to read. I would not want the batch processes to

XML Help

2005-11-03 Thread Scott Taylor
Hi All, I'm using XML::Simple to parse a very simple XML file and dump the data into hashes of hashes. The problem I'm getting, is sometimes information is blank in the XMl file; it looks like this: STREETNUM/ instead of STREETNUM1234/STREETNUM and when I print the hash: print

Re: XML Help

2005-11-03 Thread Dermot Paikkos
On 3 Nov 2005 at 7:45, Scott Taylor wrote: Hi All, I'm using XML::Simple to parse a very simple XML file and dump the data into hashes of hashes. The problem I'm getting, is sometimes information is blank in the XMl file; it looks like this: STREETNUM/ instead of

Re: XML Help

2005-11-03 Thread Shawn Corey
Scott Taylor wrote: if ($x-{VEHICLE}-{STREETNUM}){ print ... } else { print ; } but even that doesn't work. Cheers. -- Scott What do you mean when you say it doesn't work? Are you getting something like this? Use of uninitialized value in concatenation (.) or string ... If so, try:

Re: Which logger do I want? Or write my own? How?

2005-11-03 Thread Wiggins d'Anconia
Siegfried Heintze wrote: I have a couple of batch jobs that run every couple of hours. They scrape web sites and populate an MSAccess database. I would like to write a GUI to monitor them. Presently all my diagnostic print statements just scroll by and they are very hard to read. I would

Re: XML Help

2005-11-03 Thread Scott Taylor
Dermot Paikkos said: On 3 Nov 2005 at 7:45, Scott Taylor wrote: Hi All, I'm using XML::Simple to parse a very simple XML file and dump the data into hashes of hashes. The problem I'm getting, is sometimes information is blank in the XMl file; it looks like this: STREETNUM/ instead of

Re: XML Help

2005-11-03 Thread Bob Showalter
Scott Taylor wrote: Hi All, I'm using XML::Simple to parse a very simple XML file and dump the data into hashes of hashes. The problem I'm getting, is sometimes information is blank in the XMl file; it looks like this: STREETNUM/ instead of STREETNUM1234/STREETNUM and when I print the hash:

Re: XML Help

2005-11-03 Thread Bob Showalter
Scott Taylor wrote: Dermot Paikkos said: I would also say that the source file is wrong, it should read STREETNUM/STREETNUM I read somewhere that blah / is correct syntax (same as blah/blah) You are correct. The two forms are exactly equivalent. see:

Checking pixel sizes

2005-11-03 Thread Mike Blezien
Hello, I'm using ImageMagick to create thumbnails and other image manipulation with a upload script. And was wondering if the actual pixel size can be checked with ImageMagick ?? I've used Image::Size to do this, but was wondering it can be done using ImageMagick without having to install a

help on converting pdf to text

2005-11-03 Thread Jenny Chen
Hi Everyone, Does anyone know how to convert a pdf file to text file in Perl? Thanks Jenny -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: help on converting pdf to text

2005-11-03 Thread Stephen York
First off, realise that a pdf isn't just a marked up text document. It's a wrapper for images and text, movies and many other formats. If you have a text pdf, then the text is a postscript object catalogued somewhere within the pdf. I've never done this in perl, but there are many commercial

RE: help on converting pdf to text

2005-11-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Stephen York wrote: First off, realise that a pdf isn't just a marked up text document. It's a wrapper for images and text, movies and many other formats. If you have a text pdf, then the text is a postscript object catalogued somewhere within the pdf. I've never done this in perl, but

langinfo

2005-11-03 Thread Manish Uskaikar
HI, I am currently looking for langinfo packages, Can any one look into the following path on their machines and email me the perl dir ..perl\lib\I18N. Thanking you in advance. Regards, Manish U

Re: help on converting pdf to text

2005-11-03 Thread Octavian Rasnita
I have seen a program named pdftotex that can extract the text from .pdf files, and that program can be used in a perl program for extracting the text from more .pdf files. Search with Google for it. I have seen that it can extract the text even from some pdf files that have a copy protection