The error references the List::Util module, but doesn't occur unless I add the "use File::Copy", ...

The odd thing there is that List::Util is being referenced, but I don't see how List::Util (which is quite separate from List::MoreUtils) gets loaded.

If your account of what's happening is accurate, then the only explanation I can think of is that, on your system, using File::Copy leads to the loading of List::Util (either by "use" or "require"), and the incompatible List::Util intalled in /home/user_foo/perl_modules/lib/perl5 is the one that gets found.

On my system, use File::Copy does not lead to List::Util being loaded - but File::Copy probably does some things differently on different systems.

If you want to check which modules have been loaded by your script (and where they were found), just add the following line at the end of your script:
for(keys %INC) { print "$_: $INC{$_}\n" };
If placed at the end of the script, that will not only tell you the modules that were loaded by "use", but also any modules that were subsequently loaded via "require" during the running of your script. (That's assuming, of course, that the script runs to completion ;-)

Cheers,
Rob

In reply to Re: help with "symbol lookup error" message by syphilis
in thread help with "symbol lookup error" message by Special_K

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.