I don't think problem is in device, probably something with ENV. The script is simple:
use strict; use warnings; use Device::SerialPort; use HTTP::Tiny; sub send_msg { my ($self, $enccmd) = @_; my $pass = $oPrinter->write($enccmd) || return "Cannot communicate + with Fiscal printer !"; my $timeout = 1; $oPrinter->read_char_time(0); $oPrinter->read_const_time(200); # Read_Total = read_const_time + (read_char_time * bytes_to_read) my $chars = 0; my $buffer = ""; while ($timeout > 0) { my ($count, $saw) = $oPrinter->read(1); if ($count > 0) { if (ord($saw) != 22) { $chars += $count; $buffer .= $saw; } } else { $timeout--; } } return $buffer; } my $test = $self->send_msg("\r\nGET NEW DATA\r\n"); my $url = "$self->{HOST}/report.php?fnac="; $url .= "$self->{unic}&num="; $url .= "$test"; my $response = HTTP::Tiny->new->get($url);
I saw something like this string "\x33\x35" on other project and I start thinking may be the problem is how data is delivered, like error how data is parsed or send and parsed like php urlencode something like that. I also because never see such a value in variable, don't know how is present there. Any suggestion ?

In reply to Re^3: How to identify string by Acnapyx
in thread How to identify string by Acnapyx

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.