Re: Server check

2010-08-13 Thread Chaitanya Yanamadala
Hai All Thank you guys for your replies. I would note these points which you have mentioned and try to use further in my coding. Regards Chaitanya On Sat, Aug 14, 2010 at 5:45 AM, Chas. Owens wrote: > On Fri, Aug 13, 2010 at 05:23, Chaitanya Yanamadala > wrote: > > Hai > > After a lot of frust

Re: Server check

2010-08-13 Thread Chas. Owens
On Fri, Aug 13, 2010 at 05:23, Chaitanya Yanamadala wrote: > Hai > After a lot of frustration i have build this code to check which of the > server is down and which is up. snip Here is a major rewrite. In order of importance, here is a list of changes I made: * Use whitespace properly, when in

Re: Regular expression question

2010-08-13 Thread Jim Gibson
On 8/13/10 Fri Aug 13, 2010 1:47 PM, "irata" scribbled: > Hi... > > I want to replace in a javscript structure like the one below every > occurence of "{#...}", "{?...}", "{+...}" and "{=...}" through > something different (also nested): Check out the Text::Balanced module, available at CPAN:

Regular expression question

2010-08-13 Thread irata
Hi... I want to replace in a javscript structure like the one below every occurence of "{#...}", "{?...}", "{+...}" and "{=...}" through something different (also nested): function() { test1 = "{#Caption}"; test2 = "{#Te{?st}}"; test3 = "{+date.{0}}"; } with this regular e

Re: Server check

2010-08-13 Thread Uri Guttman
Bg> On Fri, Aug 13, 2010 at 9:05 AM, Vimal wrote: >> With that being said, please do yourself a favour and get a copy of "Perl >> Best Practises" >> >> On 08/13/2010 09:25 PM, Uri Guttman wrote: >>> >>> before i (or anyone else) will delve into your code, please learn to use >>>

Re: Server check

2010-08-13 Thread Bob goolsby
Congratulations. You have just (re)invented Nagios. B On Fri, Aug 13, 2010 at 9:05 AM, Vimal wrote: > With that being said, please do yourself a favour and get a copy of "Perl > Best Practises" > > On 08/13/2010 09:25 PM, Uri Guttman wrote: >> >> before i (or anyone else) will delve into your

Re: interpolation problem in emacspipe.pl script from emacswiki

2010-08-13 Thread Uri Guttman
> "GS" == Gabriel Striewe writes: GS> my $status = system("emacsclient -n --eval '(progn (pop-to-buffer (get-buffer-create \"*piped*\")))'"); GS> if($status!=0){ exit 1; } GS> while(){ GS> system("emacsclient -n --eval '(with-current-buffer \"*piped*\" (insert \"" . $_ . "\"))

Re: Server check

2010-08-13 Thread Vimal
With that being said, please do yourself a favour and get a copy of "Perl Best Practises" On 08/13/2010 09:25 PM, Uri Guttman wrote: before i (or anyone else) will delve into your code, please learn to use white space and indenting. you can't read code that is all tightly jumbled together like

Re: Server check

2010-08-13 Thread Uri Guttman
before i (or anyone else) will delve into your code, please learn to use white space and indenting. you can't read code that is all tightly jumbled together like this. and don't use very short variable names as they tell the reader nothing about the program. you need to learn to write code the oth

Re: Encoding issues.

2010-08-13 Thread Dermot
On 13 August 2010 13:35, Kwaku Addo Ofori wrote: > Hi Guys, > > I just wrote a script that retrieves some records from a MYSQL database. > These records contain a lot of the special characters from the French > language. I need a way to decode these characters properly before sending > them on to

Encoding issues.

2010-08-13 Thread Kwaku Addo Ofori
Hi Guys, I just wrote a script that retrieves some records from a MYSQL database. These records contain a lot of the special characters from the French language. I need a way to decode these characters properly before sending them on to a third party. For example, retrieving this from the databas

interpolation problem in emacspipe.pl script from emacswiki

2010-08-13 Thread Gabriel Striewe
Dear List, i found on the emacswiki the following script written in Perl which is supposed to make emacsclient read from a pipe: #! /usr/bin/perl # This script uses emacsclient, be sure to have a running server session. # A server-session can be started by "M-x server-start". my $status = syste

Server check

2010-08-13 Thread Chaitanya Yanamadala
Hai After a lot of frustration i have build this code to check which of the server is down and which is up. These are the requirements needed to run this code. 1. Linux machine, 2. Perl >5.8 3. Sql server >5.1 4. XML::LibXML module in perl 5. DBI module 6. sendmail need to installed and service nee