The Sample output I gave was my initial script the one I posted was to reproduce the same issue with a smaller code, as the other code ran to about 4000 or more lines with some dbi connections and queries against the database.
Why I am creating a new socket with every command entered by the user is also because I could not get the script to work with just one connection...as I explained above the main script does the following
1. accept a users command
2. parse the users command to see if the syntax is correct
3. connect to a local oracle database and execute the relevant sql with regards to the command entered by the user
4. go to a server that should have similar data based on an already defined hostname, oracle sid, username and password and check whether the same data is there
5. report back to the user on the local host the results
6. User now gets the prompt back and can enter new commands if wanted

I have tried to put $socket->close ; in a varied number of places especially in the function that creates client connections but I am sure this did not fix the issue. I will test this out again and post my findings.
Thanks for the tip.

In reply to Re^2: Client-Server Programme hangs... by aodukoya
in thread Client-Server Programme hangs... by aodukoya

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.