Re: calling Jar file

2009-08-21 Thread Eric Veith
lemba wrote on 08/20/2009 01:08:32 AM: > Both approaches are not working as expected. They execute jar ok but > java is crasing somewhere and gives error. What error do you get? -- IBM Systems & Technology G

Re: Using perl code in K and C shell

2009-07-22 Thread Eric Veith
Surprising it works with bash at all. For the shell, your string is: '$re=q~', and the rest is no longer escaped. HTH, -- Eric From: "Mallya, Vaibhav U"

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Eric Veith
You could create a simple daemon that works using the observer OOP concecpt: Nodes register themselves as observers to the server that should be monitored, which constantly sends "I am alive" packets AND tries to notify the connected observers when it's beeing rebooted using another message. HTH

Re: perl query

2009-07-14 Thread Eric Veith
The backticks work just as they would in a shell script. You're using them the wrong way in your example, anyways. my $output = `command param`; my $rc = system('command', 'param' From: Rajini Nai

Re: Edit a config file using perl cgi script

2009-07-09 Thread Eric Veith
x27;ll probably know that already. :-) -- Eric Alpesh Naik wrote on 07/09/2009 12:23:54 PM: > From: > > Alpesh Naik > > To: > > Eric Veith/Germany/i...@ibmde > > Date: > > 07/09/2009 12:23 PM > > Subject: > > Re: Edit a config file usi

Re: Edit a config file using perl cgi script

2009-07-09 Thread Eric Veith
sudo perl -e 'open($fh, "<", "/tmp/foo"); @f = <$fh>; close($fh); open($fh, ">", "/tmp/foo"); foreach(@f) { s/^(Key1=).*/$1NewValue1/; print $fh $_; } close($fh);' As always, TIMTOWTDI. HTH, -- Eric, Alpesh Naik wrote on 07/09/2009 11:34:43 AM: > From:> > > Alpesh Naik > > To: > >

Re: Redirecting STDOUT and STDERR for system()

2009-07-06 Thread Eric Veith
That works like a charm -- thanks! "Chas. Owens" wrote on 07/05/2009 03:57:34 AM: > From: > > "Chas. Owens" > > To: > > Eric Veith/Germany/i...@ibmde > > Cc: > > beginners@perl.org > > Date: > > 07/05/2009 03:58 AM > > Subj

Re: Need help w/ substitute ie. s/x/y/

2009-07-06 Thread Eric Veith
Dennis, Gunnar is right, you're misusing character classes. A correct regular expression could look like this (using /x and Perl 5.10's named capture buffers): /(?]+>) (?]+>) \s, (?]+>]+>) (?[^<]+) /x I did not test that, but I guess you'll get the meaning. :-) HTH -- Eric "Den

Redirecting STDOUT and STDERR for system()

2009-07-02 Thread Eric Veith
Hello List, as part of a Perl script of mine, I want to execute a program, get its return code AND capture its output on both STDERR and STDOUT. I tried IO::Handle, but that only gives me STDOUT and not the return code. Using qr//, I cannot read linewise and have to load the complete program's ou