Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
I am trying to read data from a paging receiver which is connected to the serial port. Here is the problem, I can only read/store the first 14 characters that are sent to the device. Here is part of my code:
$ob->lookclear; #clear the buffers $ob->buffers(4096,4096); #read, write sleep 1; until($return ne "") { if (($return = $ob->input) ne "") { $ob->write ($return); print "return:$return a"; } else { print "ERROR!! Did not receive a page yet!\n"; } }#end until print "return is:$return"; undef $ob;
Is there any way to store more than 14 characters in the variable. Also, any sample "serial port" code would be helpful. Thanks for your help, Jason

In reply to Reading data from the Serial Port by Anonymous Monk

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.