Hm, so it looks like you're using the system Perl. I assume your scripts also start with the line "#!/usr/bin/perl"? Then question then is why cpanm Device::SerialPort shows the module is installed. Perhaps you're using a not fully configured local::lib? Did you try looking for the SerialPort.pm file like tybalt89 suggested? Also, if you could show the output of the following commands.

$ echo $PERL5LIB $ echo $PERL_MB_OPT $ echo $PERL_MM_OPT $ echo $INSTALL_BASE

Update: I struck the question that I missed your answer to before. Also, I should say that modifying the system Perl with cpan or cpanm is not necessarily recommended, since it's possible for failed module installations to mess up the system Perl and potentially all the system tools that rely on it. It usually is ok to install modules into the system Perl with the system's package manager though, so on Ubuntu you could use sudo apt-get install libdevice-serialport-perl. Either that, or you could use local::lib to install modules in your home directory, or you could even use perlbrew to install your own local copy of Perl that you can install all the modules you like, plus you'd get the newest version of Perl available.


In reply to Re^3: Device::SerialPort Brain Problems (updated) by haukex
in thread Device::SerialPort Brain Problems by wm1ke

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.