hi, me again..
i found why i cant use perl -MCPAN -e 'install Device::SerialPort' and get an error message like i posted,
becoz this module need to run h2ph command, and i found in RedHat & Mandrake OS, had2 file maybe strange, the strange file are /usr/include/asm/string-486.h and checksum.h i just move these 2 file to somewhee else then run h2ph -r -l . seen ok now, and i try a script from demo script:
===========================================================
#!/usr/bin/perl -w
use strict;
use vars qw( $OS_win $ob $file );
use Device::SerialPort;

$file = 'ttyS0.cfg';
$ob = Device::SerialPort->start ($file) ||
die "Can't open serial port from $file: $^E\n";

my $baud = $ob->baudrate;
print "baud from configuration: $baud\n";

my $databits = $ob->databits;
print "databits from configuration: $databits\n";

my $parity = $ob->parity;
print "parity from configuration: $parity\n";

my $stopbits = $ob->stopbits;
print "stopbits from configuration: $stopbits\n";
===========================================================
this was ok now, but my new problam is i read the DESCRIPTION on http://search.cpan.org/author/COOK/Device-SerialPort-0.12/SerialPort.pm hard to understand what cammand can let me send a command to /dev/ttyS0 and get the respond,
can someone help me!

In reply to Re: now, get new problam :P by wee_chang2002
in thread send command to RS232, then get data from RS232 by wee_chang2002

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.