So, here are some examples of code producing different results on both machines. test2.pl runs alone by itself, test3.pl does the exact same tasks but uses the test3_utils.pl file. In both cases, warnings and variable contents differ per machine.
cat test2.pl #!/usr/bin/perl use strict; use warnings; use Cwd; use File::Basename; use List::Util qw(min max); use Math::Round; use Sort::Key::Natural qw(natsort); use Storable 'dclone'; use Sys::Hostname; use Term::ANSIColor; print "decimal places: ".length(("1" =~ /\.(\d*)/)[0])."\n"; print "decimal places: ".length(("0.123" =~ /\.(\d*)/)[0])."\n"; my $line = "apple="; my $second_part = (split(/=/, $line))[1]; my $second_part_components_count = (length $second_part > 0 ? scalar ( +split(/;/, $second_part)) : 0); print "done\n"; cat test3.pl #!/usr/bin/perl use strict; use warnings; use Cwd; use File::Basename; use List::Util qw(min max); use Math::Round; use Sort::Key::Natural qw(natsort); use Storable 'dclone'; use Sys::Hostname; use Term::ANSIColor; require "test3_utils.pl"; do_foo(); do_bar(); print "done\n"; cat test3_utils.pl #!/usr/bin/perl sub do_foo { print "decimal places: ".length(("1" =~ /\.(\d*)/)[0])."\n"; print "decimal places: ".length(("0.123" =~ /\.(\d*)/)[0])."\n"; } sub do_bar { my $line = "apple="; my $second_part = (split(/=/, $line))[1]; my $second_part_components_count = (length $second_part > 0 ? scal +ar (split(/;/, $second_part)) : 0); } 1; # need to end with a true value

The scripts are copied to the second computer (SciLnx) where they produce different results:

me@UbuntuMachine: ./test2.pl Use of uninitialized value in concatenation (.) or string at ./test2.p +l line 14. decimal places: decimal places: 3 Use of uninitialized value $second_part in numeric gt (>) at ./test2.p +l line 19. done me@UbuntuMachine: ./test3.pl decimal places: decimal places: 3 done me@SciLnxMachine: ./test2.pl Use of implicit split to @_ is deprecated at ./test2.pl line 19. Use of uninitialized value in length at ./test2.pl line 14. decimal places: 0 decimal places: 3 Use of uninitialized value $second_part in length at ./test2.pl line 1 +9. done me@SciLnxMachine: ./test3.pl decimal places: 0 decimal places: 3 done
I would expect the same results and the same warnings on both machines. To my surprise, neither is the case. The SciLnx is returning 0 where the Ubuntu machine is returning nothing.

The software in question is distributed to partners, it is important that it does what we expect. Is there any way to investigate what is causing this behavioural difference?

In reply to Re^3: Warnings not working on one machine by questions
in thread Warnings not working on one machine by questions

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.