Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

For starters, please use <c>...</c> instead of <pre>...</pre>.

It looks like your object got stringified

$ perl -e' > sub method {} > my $o = bless({}); > $o->method(); # Ok > $o = "$o"; > $o->method(); > ' Can't locate object method "method" via package "main=HASH(0x814ec28)" + (perhaps you forgot to load "main=HASH(0x814ec28)"?) at -e line 6.

Tracing back I see you read a string from a file and expect it to magically become a socket handle. That's not gonna happen.

In fact, the handle gets closed at the end of PortConn as the last reference to it ($rethandle) goes out of scope.

The idea is fundamentally flawed. A handle is a token that represents a resource the OS has handed your process. The token is useless to any other process. If you want to store something, you need to store the connection details so you can re-establish the connection.


In reply to Re^3: Socket Handle not sending data ? by ikegami
in thread Socket Handle not sending data ? by evilkamikaze

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (6)
    As of 2014-12-22 00:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (109 votes), past polls