Solved

more info based on earlier question

Posted on 2002-03-21
3
147 Views
Last Modified: 2010-03-05
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
Comment
Question by:lakshminair
3 Comments
 
LVL 5

Accepted Solution

by:
Sapa earned 50 total points
Comment Utility
enclose your literal constants into apostrophes.

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

0
 

Author Comment

by:lakshminair
Comment Utility
thanx a lot for the reply - it does work...
0
 
LVL 8

Expert Comment

by:inq123
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now