Solved

more info based on earlier question

Posted on 2002-03-21
3
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
Sapa earned 50 total points
ID: 6885124
enclose your literal constants into apostrophes.

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

0
 

Author Comment

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

Expert Comment

by:inq123
ID: 9490746
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check file date before getting folder path 1 84
instmodsh - listing perl modules 2 91
iSeries PERL Scripts 7 183
Vb script to unzip a files and rename the files 5 104
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…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…

749 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