ok guys i got it : now i am facing a problem : my aim is to create a socket program with concurrent server so what i do is from my client i try connecting to a port initially and when it fails i just transfer a tar file with a perl script to server and run a server program , now i am stuck in system() from which i invoke the script on the server because this server will keep listening till the end of time (machine is off) and my system gets hung, is there any way i can get out of this system() even though the server should keep running, the test function is similar to system but is more robust 9 from open ssh package)

my $ssh = Net::OpenSSH->new ( $hostmachine, user =>$username, password + => $password); $ssh->scp_put($sourcedir,$sourcedir2,$remote_path) or die "scp failed \n" . $ssh->error; my $rc = $ssh->test('perl sabkuch.pl'); #check if test function returned or not if ($rc == 1){ print "test was ok , server established \n"; } else { print "return from test = $rc \n"; } exit;

the file sabkuch.pl is as follows

#!/usr/bin/perl use strict; use warnings; + system('tar -xvf test.tar'); exec('cd utpsm_run_automation && perl utpsm_lts_server.pl'); exit;

please help


In reply to Re: untaring at remote location by t-rex
in thread untaring at remote location by t-rex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.