Re: Frustrated newbie question

2003-12-06 Thread Fred Nastos
On December 5, 2003 12:53 pm, [EMAIL PROTECTED] wrote: > Help. I'm a frustrated newbie who wants to use Perl to make my life easier. > > The following simple task is only one small part of a program I'm trying to > put together to automate some things I currently do manually. > > I have a file whos

Can't find package AutoLoader in CGI::Application program

2003-12-06 Thread Jon Seidel
Hi... I have what I hope is an easy question. I've got perl 5.8.0 installed, and have installed CGI, CGI::Application, HTML::Template and am creating some simple test files for CGI::Application. I've created and run some other applications using CGI and have implemented a simple OO package whic

Re: Reduce file size with Imager

2003-12-06 Thread Kevin Goodsell
R. Joseph Newton wrote: Eamon Daly wrote: Hi, all. I'm using Imager to create gifs, but the resultant file sizes are /huge/. I'm writing the files out like so: Are you doing animations? If not, skip the GIFs. You can get much better depth [16 million] in a lot less space with JPEG files. Som

Re: Newbe needs help

2003-12-06 Thread sadman
Tim Johnson wrote: I would recommend getting a strong grasp of Perl before you start trying to make one-liners for problems like this, since you can end up making a simple problem much more complicated. What's wrong with this: use strict; use warnings; open(OUTFILE,">>script

Re: Perl & Mysql

2003-12-06 Thread Bryan Harris
> Which modules i have to install in order to connect > perl with mysql ?, in what order ?, My perl > installation is on solaris 9. I already have mysql > installed. Thanks for the help. Here's what I wrote up while installing under OS X, should be pretty similar: > To install perl support f

RE: Reading from log

2003-12-06 Thread Tom Kinzer
Typically I'm against just doing something for somebody, but you caught me at a good time. Here is an example to get you started: #!/usr/local/bin/perl -w use strict; my $input = shift; my $total; die "Usage: Arg1: Input File to Scan." unless $input; open IN, "< $input" or die "Unable to o

Re: Reduce file size with Imager

2003-12-06 Thread R. Joseph Newton
Kevin Goodsell wrote: > Third, only in relatively bad cases will GIF require a byte for every > pixel. For example, I just created a solid white 200 by 200 image. > That's 40,000 pixels. The file size is 345 bytes. One byte per pixel is > what you would get if no compression was used at all (proba

Re: Pattern matching

2003-12-06 Thread drieux
On Dec 5, 2003, at 3:48 PM, B. Fongo wrote: I went back to my books to refresh my memory on how to use references. Your suggestion help a lot, but the subroutine returns wrong values. It was intent upon demonstrating an idea to see how much work were we really into. The following actually sorta ex

Re: Newbe needs help

2003-12-06 Thread drieux
On Dec 5, 2003, at 11:20 PM, sadman wrote: [..] i have lert a few basics but still im stuck on a problem ;-( [..] What i need to do now is instaed of having the text in the code, have it open up another txt file read the whole txt file and then add all the text from that said file to the end of the

Re: formats

2003-12-06 Thread drieux
On Dec 5, 2003, at 6:39 PM, Jose Malacara wrote: [..] write TYPE_1; that's the sticky bit, where tom is talking about not writing to a filehandle... [..] To expand on tom's comments a bit: which generates Type: type1Ga

Seeding a Random Number Generator

2003-12-06 Thread PD Schloss
Hi, I'm reviewing a perl script that someone wrote to do a statistical analysis. I know it's bad form, but I was wondering if anyone knows what the default seed is for the random number generator in Perl. They haven't seeded it with "srand" - what does this do? It still seems to pick random num

Re: Seeding a Random Number Generator

2003-12-06 Thread Rob Dixon
Pd Schloss wrote: > > I'm reviewing a perl script that someone wrote to do a statistical > analysis. I know it's bad form, but I was wondering if anyone knows > what the default seed is for the random number generator in Perl. They > haven't seeded it with "srand" - what does this do? It still s

Re: Frustrated newbie question

2003-12-06 Thread Rob Dixon
Stuart Clemons wrote: > > Help. I'm a frustrated newbie who wants to use Perl to make my life easier. > > The following simple task is only one small part of a program I'm trying to > put together to automate some things I currently do manually. > > I have a file whose format looks like this: > > n

Re: Reading from log

2003-12-06 Thread Rob Dixon
Danield wrote: > > 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|Rock Bottom > Triple H|Boo|

Re: Reduce file size with Imager

2003-12-06 Thread R. Joseph Newton
Kevin Goodsell wrote: > Third, only in relatively bad cases will GIF require a byte for every > pixel. For example, I just created a solid white 200 by 200 image. > That's 40,000 pixels. The file size is 345 bytes. One byte per pixel is > what you would get if no compression was used at all (proba

Re: Perl & Mysql

2003-12-06 Thread Randal L. Schwartz
> "Dan" == Dan Muey <[EMAIL PROTECTED]> writes: >> Which modules i have to install in order to connect >> perl with mysql ?, in what order ?, My perl Dan> Excellent choice of combo! I disagree. The only reason to choose MySQL over PostgreSQL these days is compatibility with an existing bolt

Re: Perl & Mysql

2003-12-06 Thread Wiggins d'Anconia
Randal L. Schwartz wrote: "Dan" == Dan Muey <[EMAIL PROTECTED]> writes: Which modules i have to install in order to connect perl with mysql ?, in what order ?, My perl Dan> Excellent choice of combo! I disagree. The only reason to choose MySQL over PostgreSQL these days is compatibility with

Re: Seeding a Random Number Generator

2003-12-06 Thread John W. Krahn
Pd Schloss wrote: > > Hi, Hello, > I'm reviewing a perl script that someone wrote to do a statistical > analysis. I know it's bad form, but I was wondering if anyone knows > what the default seed is for the random number generator in Perl. They > haven't seeded it with "srand" - what does this

Re: Replacing text

2003-12-06 Thread John W. Krahn
Dan Anderson wrote: > > I have a script that reads text from a file and inserts text > into different places depending on what it needs to do. But I use > split to replace the text, i.e.: > > ($first_part, $second_part) = split "#INSERT#TEXT#HERE#", $document, 2; > print FILEHANDLE

Re: How to verify whether a directory exists

2003-12-06 Thread drieux
On Dec 6, 2003, at 5:27 PM, B. Fongo wrote: I want to use mkdir(blah blah, o777), but want to first find out whether the directory "blah blah" exists. I'm not if the -e option will bw right here. Let's say: unless (-e blah_blah) mkdir(blah_blah, 0777); # Is this okay? May I recommend Fil

How to verify whether a directory exists

2003-12-06 Thread B. Fongo
I want to use mkdir(blah blah, o777), but want to first find out whether the directory "blah blah" exists. I'm not if the -e option will bw right here. Let's say: unless (-e blah_blah) mkdir(blah_blah, 0777); # Is this okay? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: How to verify whether a directory exists

2003-12-06 Thread Wiggins d'Anconia
Please don't cross post, if your question is CGI based then use that list, otherwise use the other... B. Fongo wrote: I want to use mkdir(blah blah, o777), but want to first find out whether the directory "blah blah" exists. I'm not if the -e option will bw right here. Let's say: unless

Re: Perl & Mysql

2003-12-06 Thread Randal L. Schwartz
> "Wiggins" == Wiggins D'Anconia <[EMAIL PROTECTED]> writes: Wiggins> But what are the reasons for choosing PostgreSQL over MySQL? What's a Wiggins> "real" database? Without providing reasons this is just FUD. I will Wiggins> agree that if you are looking for a package closer to a "real Wig