I am having fun with modules. The web server I am attempting this on does not have the correct module installed (DBD::CSV), the admin won't install it for me and I have no telnet access to the machine. So, I created a lib directory in the root of the web server and placed the CSV.pm and File.pm in a DBD directory. I am calling it thusly:

1: #!/usr/bin/perl
2: 
3: use lib '/home/user/www/lib';
4: use DBD::CSV;
5: 
6: exit;

using the handy web server verbose check_perl util, I get this error.

Illegal character \015 (carriage return) at /home/user/www/lib/DBD/CSV.pm line 1.
(Maybe you didn't strip carriage returns after a network transfer?)
BEGIN failed--compilation aborted at /home/user/www/test.pl line 4.

I know for a fact that the carraige returns are not the problem, because I have tried this with numerous modules, all giving me the same error. The line number (for the "illegal carraige return") will always be the line immediately preceding the first line of uncommented code.

As you can see, I am thoroughly confused. I may be missing something blatently obvious, but any help would be appreciated.


In reply to Modules, the hard way by Anonymous Monk

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.