I'm getting a very peculiar error when I load the open pragma before I load the Text::CSV_XS module.

C:\strawberry>perl -MText::CSV_XS -Mopen=:encoding(UTF-8) -e 1 C:\strawberry>perl -Mopen=:encoding(UTF-8) -MText::CSV_XS -e 1 Bareword found where operator expected at C:/strawberry/perl/site/lib/ +Text/CSV_XS.pm line 3, near "1 H" (Missing operator before H?) syntax error at C:/strawberry/perl/site/lib/Text/CSV_XS.pm line 3, nea +r "1 H" BEGIN not safe after errors--compilation aborted at C:/strawberry/perl +/site/lib/Text/CSV_XS.pm line 23. Compilation failed in require. BEGIN failed--compilation aborted. C:\strawberry>perl -Mopen=:encoding(ASCII) -MText::CSV_XS -e 1 Bareword found where operator expected at C:/strawberry/perl/site/lib/ +Text/CSV_XS.pm line 3, near "1 H" (Missing operator before H?) syntax error at C:/strawberry/perl/site/lib/Text/CSV_XS.pm line 3, nea +r "1 H" BEGIN not safe after errors--compilation aborted at C:/strawberry/perl +/site/lib/Text/CSV_XS.pm line 23. Compilation failed in require. BEGIN failed--compilation aborted. C:\strawberry>head -23 C:/strawberry/perl/site/lib/Text/CSV_XS.pm package Text::CSV_XS; # Copyright (c) 2007-2011 H.Merijn Brand. All rights reserved. # Copyright (c) 1998-2001 Jochen Wiedmann. All rights reserved. # Portions Copyright (c) 1997 Alan Citterman. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # HISTORY # # Written by: # Jochen Wiedmann <joe@ispsoft.de> # # Based on Text::CSV by: # Alan Citterman <alan@mfgrtl.com> # # Extended and Remodelled by: # H.Merijn Brand (h.m.brand@xs4all.nl) require 5.005; use strict; C:\strawberry>

What's causing this problem?

I'm running Strawberry Perl version 5.14.2, open version 1.08, and Text::CSV_XS version 0.85.

Jim


In reply to Peculiar Error When Loading open Pragma Before Text::CSV_XS Module by Jim

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.