Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Using Config::IniFiles Module Obtain Comma Separated Values into An Array

by Anonymous Monk
on May 27, 2016 at 07:38 UTC ( [id://1164278]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using Config::IniFiles Module Obtain Comma Separated Values into An Array
in thread Using Config::IniFiles Module Obtain Comma Separated Values into An Array

Well, Config::IniFiles doesn't do that, it only supports newlines seperation, so the only way to get it, is to subclass/extend Config::IniFiles or ...
  • Comment on Re^3: Using Config::IniFiles Module Obtain Comma Separated Values into An Array

Replies are listed 'Best First'.
Re^4: Using Config::IniFiles Module Obtain Comma Separated Values into An Array
by Anonymous Monk on May 27, 2016 at 08:02 UTC
    Please do go on Anonymous Monk.

    I am listening.
Re^4: Using Config::IniFiles Module Obtain Comma Separated Values into An Array
by perlPsycho (Initiate) on May 27, 2016 at 08:06 UTC
    Okay How do I do that...??

    Please share a sample or snippet code if possible.

    Even a link would suffice..

      You have already been shown the link to split. The next step is to apply that function to your code.

      Please note that this is not a script writing service. Your constant asking for "sample or snippet of code" feels to me as if you are unable or unwilling to write any code yourself. This is not what this site is for.

      This site is for and by programmers or people learning how to program, with the central focus on Perl.

      Your problem would be easily solved by writing one additional line of Perl code. You have stated that this is impossible for you, but have not stated at all why this would be impossible for you.

      If your requirements prohibit you from actually programming, this site is not for you.

      hehe, what corion said :)
      package MyConfini; use parent qw/ Config::IniFiles /; sub MyConfini::arrayValBySpace { my( $self, @rest ) = @_; my @vals = $self->val( @rest ); if( @vals == 1 ){ @vals = split ' ', $vals[0]; } return vals; }
        Thank you for your time,

        I cannot do this.
        I cannot use split or regex or anything other than the module's inbuilt function as i mentioned on the top of the Link's description.

        I am really close to the solution.

        I just need to make a modification on my config file.

        Thank you for going through the trouble of coding it here.

        Appreciate it a lot.
          A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1164278]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found