Re: mysql server has gone away

2006-03-04 Thread Jeff Pang
There is little problems with the Mysql,your matter is seems something uncorrect with your httpd.conf set. Do you use Apache::Register?Do you include the path '/home/hosting/foo.bar/public_html/libs/perl' in your @INC? -Original Message- >From: Brano Gerzo <[EMAIL PROTECTED]> >Sent: Mar

multiple system commands

2006-03-04 Thread Saurabh Singhvi
Hi I have a script which executes some system commands one after the other. But as can be seen from what is written the limitation is that they are executed one after the other. Now, I want them to run simultaneously. So, how should i go about doing it?? thanks Saurabh

Re: multiple system commands

2006-03-04 Thread Jeff Pang
Call the 'exec' in your scripts please.for example,you want to execute three system commands: call0,call1,call2,you could write: for (my $i=0;$i<3;$i++){ die "can't fork $!" unless defined my $child = fork(); unless ($child){ exec "call$i"; die "can't exec call$i"; } }

Re: problems with logical && (and) statement

2006-03-04 Thread Hans Meier (John Doe)
Angus am Freitag, 3. März 2006 17.40: > Yes, I did have that typo in my script. I fixed it but I am still never > seeing anything print out that says "I have a match" as the first if > control should do. Have you ensured that the compared data structures meet the conditions for a match? The com

Re: hash of hashes & arrays

2006-03-04 Thread Hans Meier (John Doe)
regatta am Freitag, 3. März 2006 21.29: > Good morning/evening everyone, > > I have a hash of data , this hash is very big with dynamic elements > (strings, numbers, hashes, arrays) > > Here is an example > > $info{'system'}{'load'}{'1'} > $info{'system'}{'load'}{'5'} > $info{'system'}{'load'}{'15'

Re: multiple system commands

2006-03-04 Thread JupiterHost.Net
Saurabh Singhvi wrote: Hi Hello, I have a script which executes some system commands one after the other. But as can be seen from what is written the limitation is that they are executed one after the other. Now, I want them to run simultaneously. So, how should i go about doing it?? ht

trimming white space in data

2006-03-04 Thread David Gilden
I am trying to trim white space, at the front and end of a string. The following is not working #!/usr/bin/perl $name = " Dave Gilden"; $name =~ s/^\s*([\w .-]{1,120})\s*$/$1/; print "|$name|"; # This gets the front but not the back! $name = " Dave Gilden"; ($name) = ($name =~ m/^\

Re: trimming white space in data

2006-03-04 Thread JupiterHost.Net
David Gilden wrote: I am trying to trim white space, at the front and end of a string. The following is not working #!/usr/bin/perl $name = " Dave Gilden"; $name =~ s/^\s*([\w .-]{1,120})\s*$/$1/; print "|$name|"; # This gets the front but not the back! You're only doing it once

Re: trimming white space in data

2006-03-04 Thread John W. Krahn
David Gilden wrote: > I am trying to trim white space, at the front and end of a string. perldoc -q "How do I strip blank space from the beginning/end of a string" John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Re: trimming white space in data

2006-03-04 Thread Chris Weller
I use a much shorter regex. I don't have my code in front of me, but if I can remember correctly it is: $string =~ s/^\s+//; # Trim leading white-space $string =~ s/\s+$//; # Trim trailing white-space Hope this helps...just another way of doing it. - Chris

Re: trimming white space in data

2006-03-04 Thread Jeff Pang
> >$string =~ s/^\s+//; # Trim leading white-space >$string =~ s/\s+$//; # Trim trailing white-space > You could get it more shorter as: $string =~ s/^\s+|\s+$//g; :-) -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co