Re: forking problem with dbd::mysql

2007-05-08 Thread Jeremy Kister
On 5/9/2007 12:01 AM, Jeff Pang wrote: > 1) too less timeout setting in my.cnf? see /etc/my.cnf and look for this line: I actually have no my.cnf. But if I s/my $pid = fork()/my $pid=1/ all works fine, even with 60 second sleeps. > 2) as we know,child exiting would return a SIGCHLD signal to par

Re: forking problem with dbd::mysql

2007-05-08 Thread Jeff Pang
-Original Message- >From: Jeremy Kister <[EMAIL PROTECTED]> >Sent: May 9, 2007 11:05 AM >To: beginners@perl.org >Subject: forking problem with dbd::mysql > >I'm am having an issue with a mysql connection that displays itself when >there's forking going on which I can't track down. > >I've

forking problem with dbd::mysql

2007-05-08 Thread Jeremy Kister
I'm am having an issue with a mysql connection that displays itself when there's forking going on which I can't track down. I've made a test program at http://jeremy.kister.net/code/ftest.pl to demonstrate. I expect this program to print 'SQL RESULT: 1' for as long as it can. But instead: SQL RE

Re: looping through a file

2007-05-08 Thread Robert Hicks
Rob Dixon wrote: Robert Hicks wrote: I decided to back up a bit and try a more simple routine. I have the array @id_hits populated and I can search the log for the line and print it. The problem is it only finds the first match and that is it. foreach my $prime_id ( @id_hits ) { while ( m

Re: [SPAM] Re: perl 5.8.8 install problem

2007-05-08 Thread Kevin W. Gagel
- Original Message - >I think spamd can run on seperate box, maybe it is easier/quicker to setup >fresh SA on fresh box than fixing the broken perl on the production email >server. It can. But I'm a firm believer in fixing things properly. My setup has a two stage anti-spam setup, the ext

Re: [SPAM] Re: perl 5.8.8 install problem

2007-05-08 Thread Vincent Li
On Tue, 8 May 2007, Kevin W. Gagel wrote: - Original Message - Life really sucks. At least it sounds like it is a personal or development machine rather than a production system. I wish... It's my gateway email server. I've bypassed all anti-spam/perl functions to keep it running whi

Re: perl 5.8.8 install problem

2007-05-08 Thread Kevin W. Gagel
- Original Message - >Life really sucks. At least it sounds like it is a personal or >development machine rather than a production system. I wish... It's my gateway email server. I've bypassed all anti-spam/perl functions to keep it running while I figure out what to do.

Re: [SPAM] perl 5.8.8 install problem

2007-05-08 Thread Kevin W. Gagel
- Original Message - >Because, if I remember correctly, mod_perl will still be broken. >Unless he is willing to recompile it as well then he will have a >problem with it. The docs seem to support my memory: Yes I am, in fact it was one of the first steps I took to fix the problem. Contrar

Re: perl 5.8.8 install problem

2007-05-08 Thread Chas Owens
On 5/8/07, Kevin W. Gagel <[EMAIL PROTECTED]> wrote: - Original Message - >Short answer: You have RHEL, put in a support call. Right. And paid support... Ah, bad assumption on my part. >Medium answer: We cannot tell you much without know how you tried to >install perl 5.8.8. RPM fr

Re: [SPAM] perl 5.8.8 install problem

2007-05-08 Thread Chas Owens
On 5/8/07, Vincent Li <[EMAIL PROTECTED]> wrote: snip Why don't you get rid of all current perl and perl libraries and build from tarball source, then run the new installed cpan command to install modules that SA depends on snip Because, if I remember correctly, mod_perl will still be broken. U

Re: perl 5.8.8 install problem

2007-05-08 Thread Kevin W. Gagel
- Original Message - >Short answer: You have RHEL, put in a support call. Right. And paid support... >Medium answer: We cannot tell you much without know how you tried to >install perl 5.8.8. RPM from a later version of RHEL? Compiled from >source? Used rpm -e to erase current install.

Re: [SPAM] perl 5.8.8 install problem

2007-05-08 Thread Kevin W. Gagel
- Original Message - >Actually, you don't need to upgrade to 5.8.8 if you don't need the new >feature which latest SpamAssassin introduced to allow SA rules written in >multi-bytes languages. Add "use bytes" back to Mail::SpamAssassin::Message >will skip the broken SARE rules warnings. To

Re: [SPAM] perl 5.8.8 install problem

2007-05-08 Thread Vincent Li
On Tue, 8 May 2007, Kevin W. Gagel wrote: I run SpamAssassin on a RHEL 4 box with the FuzzyOCR plugin. This combonation was sending errors to my log files so often that my server slowed down. Follow up on the cause revealed an upgrade to 5.8.8 would correct the problem. Actually, you don't nee

Re: perl 5.8.8 install problem

2007-05-08 Thread Chas Owens
On 5/8/07, Kevin W. Gagel <[EMAIL PROTECTED]> wrote: snip Then I installed perl 5.8.8 and re-installed my modules that I use. snip So, now I don't have a mod_perl for apache and my spamassassin won't run because of some strange perl error. snip Short answer: You have RHEL, put in a support ca

perl 5.8.8 install problem

2007-05-08 Thread Kevin W. Gagel
I run SpamAssassin on a RHEL 4 box with the FuzzyOCR plugin. This combonation was sending errors to my log files so often that my server slowed down. Follow up on the cause revealed an upgrade to 5.8.8 would correct the problem. Unfortuantly I've spent a few days cleaning up the aftermath of the p

Re: Mixing array + scalars as parameters

2007-05-08 Thread John W. Krahn
yitzle wrote: > What would be the 'correct' way to deal with a function that takes eg > 2 scalars and an array? > > Something like this? > > sub mySub($$@) { > my $first = shift; > my $last = shift; > my @list = @_; > > } > > or > > sub mySub($$@) { > my $first = $_[0]; > my $last =

Re: Mixing array + scalars as parameters

2007-05-08 Thread Chas Owens
On 5/8/07, yitzle <[EMAIL PROTECTED]> wrote: What would be the 'correct' way to deal with a function that takes eg 2 scalars and an array? snip There are many methods. I would do this: foo($first, $last, [EMAIL PROTECTED]); sub foo { croak "foo expects three arguments, two scalars and an

Mixing array + scalars as parameters

2007-05-08 Thread yitzle
What would be the 'correct' way to deal with a function that takes eg 2 scalars and an array? Something like this? sub mySub($$@) { my $first = shift; my $last = shift; my @list = @_; } or sub mySub($$@) { my $first = $_[0]; my $last = $_[1]; my @list = @_[2.. (scalar @_ - 1)]; ..

Re: looping through a file

2007-05-08 Thread Rob Dixon
Jeff Pang wrote: -Original Message- From: [EMAIL PROTECTED] Sent: May 8, 2007 9:54 PM To: [EMAIL PROTECTED] Cc: beginners@perl.org Subject: Re: looping through a file my @lines = <$AFILE>; foreach my $prime_id ( @id_hits ) { foreach my $line( @lines ) { if ( $line =~ /$pr

GPS, standard output, translation

2007-05-08 Thread Pierre TESTORI
Hi All, After more than 30 years shooting fotos with film, i use now a second-hand digital cam wich produce *.NEF files. PC env : Ubuntu 7.04 'gpscorrelate' synchronise GPS-time and cam-time to give the position of the 'shooter'. As example : 'gpscorrelate -o DSC_0934.NEF.dcraw-a.gimp.jpg'

Re: SOS - perl script

2007-05-08 Thread tom
for that matter, bash and 'tr' might do this as well? On 5/8/2007, "Jeff Pang" <[EMAIL PROTECTED]> wrote: >Squid log format is strict.Try to do, > >s/\s+/,/g; > >on each line. > > >2007/5/8, Craig Schneider <[EMAIL PROTECTED]>: >> Hi Guys >> >> Following is a log file extract which

Re: looping through a file

2007-05-08 Thread Rob Dixon
Robert Hicks wrote: I decided to back up a bit and try a more simple routine. I have the array @id_hits populated and I can search the log for the line and print it. The problem is it only finds the first match and that is it. foreach my $prime_id ( @id_hits ) { while ( my $line = <$AFILE>

Re: looping through a file

2007-05-08 Thread Jeff Pang
-Original Message- >From: [EMAIL PROTECTED] >Sent: May 8, 2007 9:54 PM >To: [EMAIL PROTECTED] >Cc: beginners@perl.org >Subject: Re: looping through a file >my @lines = <$AFILE>; >foreach my $prime_id ( @id_hits ) { > foreach my $line( @lines ) { > if ( $line =~ /$prime_id/ )

Re: looping through a file

2007-05-08 Thread yaron
Hi, every outer loop you are reading all the $AFILE lines. From the second loop the Descriptor points to the end. If you want to work this way you seed to lseek to the begin. If you you have a variable that holds the file contents you can do the following: my @lines = <$AFILE>; foreach my $pr

RE: array and hash patter matching

2007-05-08 Thread Tim Wolak
John, Below are ansewers to your questions. -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 12:57 PM To: Perl Beginners Subject: Re: array and hash patter matching Tim Wolak wrote: > Morning all, Hello, > I am working on a script that reads

Re: looping through a file

2007-05-08 Thread Robert Hicks
I decided to back up a bit and try a more simple routine. I have the array @id_hits populated and I can search the log for the line and print it. The problem is it only finds the first match and that is it. foreach my $prime_id ( @id_hits ) { while ( my $line = <$AFILE> ) { if ( $li

Re: Exporting in two packages but one file

2007-05-08 Thread Mumia W.
On 05/08/2007 03:58 AM, Martin Barth wrote: Hi all, I have a Package A with serveral subs in it and now I want to make a package A::Types with some constants in it. I have A.pm with: ..some code and subs .. package A::Type; use constant { CONST1 => "foo", CONST2 => "bar"}; package A; ..som

Re: Exporting in two packages but one file

2007-05-08 Thread Martin Barth
Hi Jeff, that would be a solution. I wanted to be lazy and don't use the complete path. If there is no other solution I just will make a A/Type.pm thanks Martin Jeff Pang schrieb: > 2007/5/8, Martin Barth <[EMAIL PROTECTED]>: > >> >> but now I dont know to import the stuff. I can't do a "use A

Re: Exporting in two packages but one file

2007-05-08 Thread Jeff Pang
2007/5/8, Martin Barth <[EMAIL PROTECTED]>: but now I dont know to import the stuff. I can't do a "use A::Type qw(:standard)" because I dont have A/Type.pm do you have any suggestions how this can be done? Hello, How about using full package path?like, $ cat A.pm package A; sub test1 {} s

Re: Inserting Image in a Button or label.

2007-05-08 Thread Chas Owens
On 5/8/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 5/8/07, Somu <[EMAIL PROTECTED]> wrote: > Thank you so much.. I was doing > $pic=$mw->Photo(args...)->pack; > by the way, how do i get the data for any picture as Zentara did? > And, please Mr. Chas, can u explain me your example in the other

Exporting in two packages but one file

2007-05-08 Thread Martin Barth
Hi all, I have a Package A with serveral subs in it and now I want to make a package A::Types with some constants in it. I have A.pm with: ..some code and subs .. package A::Type; use constant { CONST1 => "foo", CONST2 => "bar"}; package A; ..some more code and subs.. now I wanted to use

Re: Inserting Image in a Button or label.

2007-05-08 Thread Chas Owens
On 5/8/07, Somu <[EMAIL PROTECTED]> wrote: Thank you so much.. I was doing $pic=$mw->Photo(args...)->pack; by the way, how do i get the data for any picture as Zentara did? And, please Mr. Chas, can u explain me your example in the other string? I dont know what XPM is and i couldn't follow you

Re: SOS - perl script

2007-05-08 Thread Jeff Pang
Squid log format is strict.Try to do, s/\s+/,/g; on each line. 2007/5/8, Craig Schneider <[EMAIL PROTECTED]>: Hi Guys Following is a log file extract which I desperately need to covert to coma separated for an entire logile called access.log (squid proxy log) for reporting purposes. There ha

SOS - perl script

2007-05-08 Thread Craig Schneider
Hi Guys Following is a log file extract which I desperately need to covert to coma separated for an entire logile called access.log (squid proxy log) for reporting purposes. There has been some internet surfing abuse on a client's network. 1178606984.937 1 192.168.1.55 TCP_DENIED/407 1904 PO

Re: Inserting Image in a Button or label.

2007-05-08 Thread Somu
Thank you so much.. I was doing $pic=$mw->Photo(args...)->pack; by the way, how do i get the data for any picture as Zentara did? And, please Mr. Chas, can u explain me your example in the other string? I dont know what XPM is and i couldn't follow your code from static char ... -- To unsubscribe

Re: looping through a file

2007-05-08 Thread Dr.Ruud
Robert Hicks schreef: > open my $IFILE, '<', $IDFILE || die "Could not open $IDFILE: $!"; This doesn't mean what you assume it does. It is a mix up of: open(my $IFILE, '<', $IDFILE) || die "Could not open $IDFILE: $!"; and open my $IFILE, '<', $IDFILE or die "Could not open $IDFILE: $!";