Since upgrading from Ubuntu 12.04 to 14.04, Perl seems to behave differently.

I've got a script that loads a module, a module where I define the version as our $VERSION = 1.23. Now, when I call print with the $Some::Module::VERSION variable, or when I use it in a concatenation, I get a number as it would be correct for a floating point number within my locale, with a comma - I'm on a German Ubuntu here. But I'd like to have the US dot format...

To illustrate it, I've written this small test script. But: This example script does not work. It prints "1.23" (and, as bonus, tought me that there's a difference between declaring packages in one script and having them loaded as modules. printer() prints "This is .").

#!perl my $test = 1.23; print "test: $test \n"; print My::Test::Print::printer() ."\n"; package My::Test; our $VERSION = 1.11; package My::Test::Print; sub printer { print "This is ". $My::Test::VERSION ."\n"; }
Anyone here who knows what's going on?
I'm using Perl v5.18.2.

In reply to float: Perl is replacing dot with comma (automagic locale?) by isync

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.