There are at least three places in the code you demonstrated where that module is treating a scalar like an array reference. In the code you posted, that happens twice on line 8, and once on line 18. We don't know if what you posted is line 995, or line 1017 from the module... and I don't really feel like pulling the module into an editor to find out.... that's your job. ;)

I do know that the source code for that module currently on CPAN looks slightly different from what you posted, which indicates to me that you may not be using the most up-to-date version. The first difference I noticed is that the current version doesn't have the commented-out section of code that starts with # OLD PERL WINXP

So you're probably not running the most recent (v0.35, from 2008!) version of the module. Either that, or you have, or someone has modified the source of the version you are using.

We also know nothing about the context in which you're getting this error. What code is calling this module? And how was the module installed? Is it possible that some components are missing? What is different between your old Win system and your new one?

It's a very difficult question to answer because of the absence of information provided to us. But I would be asking myself why the version of the module I'm using looks different (even if just superficially) than the six year old (newest) version on CPAN.


Dave


In reply to Re: Can't use undefined value as an ARRAY reference by davido
in thread Can't use undefined value as an ARRAY reference by PilotinControl

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.