Config::IniFiles, as many other modules, is meant as a versatile instrument and therefore allows spaces, commas, etc. as part of the configuration values. So you seem to be out of luck.

Discipulus' hint is the best you can get, except he didn't quote the last sentence of that section:
A multi-line/value field that is returned in a scalar context will be joined using $/ (input record separator, default is \n) if defined, otherwise the values will be joined using \n.
So you'd have to decide beforehand which separator to use - EITHER space OR comma OR dot (OR whatever) - and go for something like
my @arr; { local $/ = ' '; @arr=$cfg->val('hello','j'); }
$/ is a Perl builtin, see perlvar (search for $RS), so it's not a "third party method".

Sorry, that was wrong, describing the module's behaviour for returning a multivalue as a scalar. But what's wrong with Corion's suggestion? split is also a Perl builtin, not "third party".

OR make the multiline field in the ini file conform to the format specified in the "FILE FORMAT" section of the module's documentation…


In reply to Re^3: Using Config::IniFiles Module Obtain Comma Separated Values into An Array by soonix
in thread Using Config::IniFiles Module Obtain Comma Separated Values into An Array by perlPsycho

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.