Re: generating GIFs

2003-12-21 Thread Robert Brown
Andrew Gaffney writes: > The resulting image is . I was modeling > the > image after one I had previously done using Paint Shop Pro at > . They look pretty darn similar > except for > the text. Can

Re: generating GIFs

2003-12-21 Thread Robert Brown
Daniel Staal writes: > --As off Sunday, December 21, 2003 11:59 AM -0600, Robert Brown is > alleged to have said: > > > Is there any alternative to gifs to make animated images? Flash is > > proprietary to macromedia, and gif to Unisys. Is there such a thing > &g

Re: generating GIFs

2003-12-21 Thread Robert Brown
Andrew Gaffney writes: > zentara wrote: > > Well, gifs were shunned by alot of the software writers because of > > the old patent issues. So your best bet will be to make your image as > > a jpg or png, then convert it to gif afterwards. > > Is PNG a good format for a 51x20 image with 4 or 5

Re: How to write a page break character.

2003-12-20 Thread Robert Brown
Randy W. Sims writes: > On 12/20/2003 2:37 AM, [EMAIL PROTECTED] wrote: > > > Hi, > > > > I want to search for the word "status" in a group of files in a > > directory and replace it with "status\n^L" where ^L is a page break > > chatacter, In vi I can type it in using cntrl+l. > > > >

Re: dbmopen problem

2003-12-10 Thread Robert Brown
Joel Newkirk writes: > Well, I guess I'll reply since nobody else has... Problem is I still > have no clue what's wrong here... :^) > > Surely somebody here can offer a hint? Please? :^) > > j I experienced a very similar problem last week. In fact, it was the reason I joined this mail

Re: Pattern Match

2003-12-10 Thread Robert Brown
R. Joseph Newton writes: > When used consciously, with at least a general awareness of the processing > load being invoked, regexes can do some really incredible things. Thanks! I especially appreciate the example you gave showing how to trim both ends of a string: that it is more efficient to

Re: sorter script with *MANY* unique records

2003-12-10 Thread Robert Brown
R. Joseph Newton writes: > Most CPUs in use average about 99% idle time, at least on the computers [some > running up to 20 open windows] on which I have checked these stats. To me, the > more important issues in normal practice have to do with comprehensibility, and > thus maintainability, t

Re: adding path to $PATH

2003-12-10 Thread Robert Brown
drieux writes: > > On Dec 9, 2003, at 10:09 PM, Pablo Cusnir wrote: > > > Is there a way using Perl to add to the environment > > variable PATH a new path, and that addition will be > > valid after the script is ran and not only for the script's scope. > > I'm working in cshell in Solaris

Problems forking -- fork DOSes my comp

2003-12-10 Thread Robert Brown
Dan Anderson writes: > I am learning about forks, so I tried the following code to make sure I > had everything down: > > #! /usr/bin/perl > > use strict; > use warnings; > > my $counter = 1; > my $pid = 0; > > while ($counter < 50) { > if ($pid = fork) { > open ("FORKED", "

Re: Pattern Match

2003-12-10 Thread Robert Brown
On Wed, 10 Dec 2003 20:11:26 +0100, "Jenda Krynicky" <[EMAIL PROTECTED]> wrote: > > 1. Perl builtins and especialy the regular expression engine is > heavily optimized. So it might very well be quicker to use a regexp > from Perl than to implement the same stuff in C. Unless you spend a >

Re: pick N random lines from a file

2003-12-10 Thread Robert Brown
Kevin Old writes: > On Wed, 2003-12-10 at 11:12, David Garamond wrote: > > I'm trying to extend the Perl cookbook recipe on how to pick a random > > line from a file: > > > > #!/usr/bin/perl > > rand($.) < 1 && ($line = $_) while <>; > > print $line; > > > > for picking up to N ra

UML meets eXtreme v. BDUF v. SEC

2003-12-10 Thread Robert Brown
(I am deliberately TOP POSTING my reply to this because it seems most appropriate.) B E A U T I F U L L Y S A I D ! ! ! Drieux writes: > > On Dec 9, 2003, at 7:08 PM, R. Joseph Newton wrote: > [..] > > UML? Isn't that the stuff the once-long-ago-knew-how-to-code > > professional sycophan

Re: Pattern Match

2003-12-09 Thread Robert Brown
Casey West writes: > : "Does the regular expression mechanism in perl optimize regular > : expressions such as the one you used earlier in this thread so that > : the execution overhead is nearly as good as the C approach I outlined > : earlier in this thread? In other words, for the problem s

Re: Pattern Match

2003-12-09 Thread Robert Brown
Rob Dixon writes: > I'm sure you have something useful to say. This seems such a waste of > your effort. > > Rob I think we are failing to communicate. What I am asking is: "Does the regular expression mechanism in perl optimize regular expressions such as the one you used earlier in this t

Re: Pattern Match

2003-12-09 Thread Robert Brown
Rob Dixon writes: > Robert Brown wrote: > > > > Rob Dixon writes: > > > > > Tom Kinzer wrote: > > > > > I didn't think it was slick at all. In fact I was disappointed that > > > it looked such a mess, but I don't see a bett

Re: Pattern Match

2003-12-09 Thread Robert Brown
Rob Dixon writes: > Tom Kinzer wrote: > I didn't think it was slick at all. In fact I was disappointed that > it looked such a mess, but I don't see a better way. Yes, it is indeed a mess, not only syntacticly, but also semantically. While it might make a good teaching example to show what y

index syntax change, base36 conversion?

2003-12-09 Thread Robert Brown
Wiggins d Anconia writes: > While attempting to figure out a way to do conversion of large (overly) > integers from base 10 to base 36, and back again I naturally went to > CPAN and looked at Math::Base36, which appears to have a bug in its use > of 'index' to determine if a character is not a

RE: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Robert Brown
Wiggins d Anconia writes: > > > > please let's do a split(/\s/, "Perl Programmer"). > > > > this return one array with two scalar: > > Perl > > Programmer > > > > that's why > > > > Back to semantics, define "Programmer". Your definition of programmer, > if it requires any knowl

Re: sorter script with *MANY* unique records

2003-12-09 Thread Robert Brown
John W. Krahn writes: > Bryan Harris wrote: > > > > >> Sometimes perl isn't quite the right tool for the job... > > >> > > >> % man sort > > >> % man uniq > > > > > > If you code it correctly (unlike the program at the URL above) then a > > > perl version will be more efficient and faster

Re: Syntax a little funny ....

2003-12-08 Thread Robert Brown
That is a a great description of what is going on, but I think his question centered on the &SYNTAX*, not the *SEMANTICS*. As a programmer from the "algebraic" school (FORTRAN, algol, pascal, C, Ada, etc.), he is unacustomed to seeing a function call without surrounding parens. The key concept he

RE: [OT] Education Level

2003-12-08 Thread Robert Brown
My junior year of high school, my school obtained an IBM 1401 computer. I was all over that thing as soon as I saw the shipping crates. I had obtained a copy of the reference manual (the so called "Principals of Operation", or "PO") before it was out of the crate. I asked if classes would be ta

Reading from log

2003-12-05 Thread Robert Brown
danield writes: > Hello all, > > I am looking for help with creating a digest of a log file. I have found > a nice tutorial that should help on > http://www.pageresource.com/cgirec/ptut14.htm. However, this tutorial > expects to have values in list separated by | : > > he Rock|Cheer|Roc

Re: using perl in a c code

2003-12-01 Thread Robert Brown
Ramprasad A Padmanabhan writes: > On Mon, 2003-12-01 at 22:02, Robert Brown wrote: > > > Sounds like you are trying to write a harvesting tool to build a > > spammer's email address list to me. Since you want to do it in C, I > > suspect that either you have a

using perl in a c code

2003-12-01 Thread Robert Brown
Sounds like you are trying to write a harvesting tool to build a spammer's email address list to me. Since you want to do it in C, I suspect that either you have a huge amount of text to parse, probably from web pages and news group postings, or you need to write a tool that will run inside of a w

Re: factorial function

2003-11-27 Thread Robert Brown
Shawn O'Donnell writes: > >Does anyone have any suggestions on how to create an array to hold the value > >of 1000 factorial? > > Do you mean 1000! > > That's a super-sized number--something like 10-to-the-2566th power, > if I am using Sterling's approximation correctly. > > I don't kn

Re: factorial function

2003-11-25 Thread Robert Brown
James Edward Gray II writes: > On Nov 26, 2003, at 1:35 AM, B. Rothstein wrote: > > > Does anyone have any suggestions on how to create an array to hold the > > value > > of 1000 factorial? > > I'm afraid I don't understand your question. An array holds multiple > values, but 1,000 fac

Re: dbmopen compatibility from perl 5.6 to 5.8

2003-11-24 Thread Robert Brown
Wiggins d'Anconia writes: > Robert Brown wrote: > > I posted this question once before, a couple of days ago, but never > > really got an answer... > > Not attempting a flame war or anything, and I don't necessarily have a > solution but your original po

dbmopen compatibility from perl 5.6 to 5.8

2003-11-24 Thread Robert Brown
I posted this question once before, a couple of days ago, but never really got an answer... I have numerous perl scripts, mostly cgi's, that open numerous password database files implemented as persistent hashes in perl code. I recently upgraded from an earlier version of Red Hat Linux to versio

CGI Script Fork

2003-11-22 Thread Robert Brown
If the only real purpose for the fork is so that the message can be displayed, why don't you just display the message in a form, and then go do the long operation single threaded. When the long operation finishes, continue to output to the same page and use some javascript to change the contents o

Re: dbmopen replacement in perl 5.8.0

2003-11-21 Thread Robert Brown
Robert Brown writes: > drieux writes: > > the alternative of course is the simpler problem of > > permissions, and that the web-server can not actually > > read the file. Do you have a piece of test code that > > merely opens and reads it? I have a very simple

Re: dbmopen replacement in perl 5.8.0

2003-11-21 Thread Robert Brown
drieux writes: > > On Friday, Nov 21, 2003, at 10:40 US/Pacific, Robert Brown wrote: > [..] > > > > # open the username/password database or create it > > dbmopen(%passwd, $passwd_db, 0600) > > || die "cannot open $passwd_db: $!"; > > &

dbmopen replacement in perl 5.8.0

2003-11-21 Thread Robert Brown
I have had to relocate my business and its network to another state. As a result, I had to change my internet connection. The new arrangement required that I use l2tp tunnelling, so I had to upgrade the fireware to redhat 9 to accomodate this (it was RH 6.1!). The upgrade seemed like a good idea,