Re: Lies, damn lies and statistics

2002-05-24 Thread Harry Jackson
--- Felix Geerinckx <[EMAIL PROTECTED]> wrote: > Yearly posting statistics for perl.beginners - 2001. What would be really clever is if you could do the same sort of stats for good code ;-). I would not feature in the top ten of any timescale. Harry ___

Re: counter spam - was Re: reading from .forward

2002-05-24 Thread Harry Jackson
--- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > > For spam or bad address, I let my procmailrc return EXITCODE=67. > That causes Sendmail or Postfix to bounce the message hard. Correct me if I am wrong (I have no doubt you will). I am never that sure of the relative merits of sending bo

RE: help!

2002-05-18 Thread Harry Jackson
--- "Beau E. Cox" <[EMAIL PROTECTED]> wrote: > Hi - > > Please try: > > use strict; > > my @list = (1, 2, 3, 4, 10, 14, 15, 16, 20, 34, 35, 36,); > my %conseq; # temp hash > $conseq{$_} = $_ for (@list); > for (keys %conseq) {delete $conseq{$_} unless $conseq{$_-1} or > $conseq{$_+1}} > my @co

Re: Regex a name field

2002-05-18 Thread Harry Jackson
> > > -Original Message- > > > From: Ned Cunningham [mailto:[EMAIL PROTECTED]] > > T Nobel > > > > > > I am trying to replace the spaces with a single space > > > > > > My code so snippet is: > > > > > > $cuname = $data[53]; > > > > > > $newcuname = /" "+/" "/$cuname; > > > > Thi

Re: Large Insert statements

2002-05-16 Thread Harry Jackson
> > From: Kevin O[SMTP:[EMAIL PROTECTED]] > > Hello all, > > I need to insert a lot of data into a mysql table. Know that I can > do it > like this example: > > > > my $sth = $dbh->prepare(q{ > INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) > }) or die $dbh->errst

Re: Large Insert statements

2002-05-16 Thread Harry Jackson
> > From: Kevin O[SMTP:[EMAIL PROTECTED]] > > Hello all, > > I need to insert a lot of data into a mysql table. Know that I can > do it > like this example: > > my $sth = $dbh->prepare(q{ > INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) > }) or die $dbh->errstr; >

Re: perl DBI disconnect question

2002-05-16 Thread Harry Jackson
> > From: Felix Geerinckx[SMTP:[EMAIL PROTECTED]] > > exit the script to prevent it from having to run through the rest > of it needlessly. do I need to explicitly disconnect before exiting >in those instances or it it OK to just exit? You can always put the >following in your script: > > E

Re: proper way to start daemon

2002-05-16 Thread Harry Jackson
> > From: Matt Simonsen[SMTP:[EMAIL PROTECTED]] > > > I have a script to monitor servers which is basically an infinate > loop that > sleeps and runs again. I start from a ssh session by the command: > > ssh -f $server "~/script &" > > It seems to be dieing on some of our busier servers.

RE: Optimising for fun/speed not good code was Unique Lists

2002-05-15 Thread Harry Jackson
> > > > sub unique{ [ keys {map { $_{$_} = 1 } @_ }] } > ^^ > > This returns a list of the results of the block { $_{$_} = 1 } > as evaluated for each value in @_. > > But the value of the expression $_{$_} = 1 is always 1, to > your map() is returnin

RE: Beyond Book Learning - the problem of Re: array numerical nam e...

2002-04-30 Thread Harry Jackson
> > From: Timothy Johnson[SMTP:[EMAIL PROTECTED]] > > > > > "I also find that it's only more confusing to be sesquipedalian in > response > to posts that only > need a simple, clear answer." > > Sesquipedalian is a pretty big word. :) There is a lot of information on the net and I try to

Re: Need help

2002-04-30 Thread Harry Jackson
> > From: Najamuddin, Junaid[SMTP:[EMAIL PROTECTED]] It is not ideal but will count each fail and if it reaches three it will execute whatever you want. I think you can change ping to only ping so many times. Hope it helps. #!PERL use strict; use warnings; my $count = 0; my $line; m

Re: Brand New Perl Beginner - trouble using activePerl

2002-04-30 Thread Harry Jackson
> > From: Larry[SMTP:[EMAIL PROTECTED]] > > > Hey ))) > > I am learning perl now for use with CGI. > > I installed active Perl on both windows Millenium AND windows XP > systems. > > Both of the fail to run a .pl file. I see a window flash on the > screen for a part of a second and the

Re: Please Help

2002-04-30 Thread Harry Jackson
> > From: Josef E. Galea[SMTP:[EMAIL PROTECTED]] > > To: [EMAIL PROTECTED] > Hi > I am a student an I'm new to Perl. For a university assignment I need > to > read the contents of a text file in an array. I am using Windows. The > code I am writing is: > > $file = "/test.txt"; > o