[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

more info based on earlier question

The earlier question was this
-------------------------------------------------------------------------------------------------------------------------------------------
i have a file 'motive.ini'. the values in the file are changed on a regular basis.
                     in my program i need to periodically update an array based on the contents of this file.
                     is it possible to do like this --
                     @array = require 'motive.ini';

                     or is there is some other way of doing this using require - this line has to be single line substitution
                     - P.S -- i cannot open the file, read from it and then push into the array.

                     thanks in advance...
---------------------------------------------------------------------------------------------------------------------------------------------
one more help -- the above code helps but if my file array.ini is
[xxx,http://www.hotmail.com,yyy,www.yahoo.com]
 the above code does not work - does the presence of special characters in the array make a difference? If so how do i change the code - help will be appreciated...
0
lakshminair
Asked:
lakshminair
1 Solution
 
SapaCommented:
enclose your literal constants into apostrophes.

['xxx','http://www.hotmail.com','yyy','www.yahoo.com']

0
 
lakshminairAuthor Commented:
thanx a lot for the reply - it does work...
0
 
inq123Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept a comment by Sapa

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

inq123
EE Cleanup Volunteer
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now