[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ReadArray
From: |
Brendan Strejcek |
Subject: |
ReadArray |
Date: |
Fri, 13 Aug 2004 14:41:53 -0500 |
User-agent: |
Mutt/1.3.28i |
ReadArray doesn't seem to be behaving as the documentation says it
should in 2.1.9. I've never used ReadArray before, so I don't know when
it stopped working (or if I am misunderstanding something). Here is my
test:
control:
actionsequence = ( shellcommands )
arrayvar = ( ReadArray(/var/tmp/array,textkey,":","#",1000) )
shellcommands:
"/bin/echo ${arrayvar[key1]} ${arrayvar[key2]} ${arrayvar[key3]}"
and /var/tmp/array is:
key1:value1
key2:value2
key3:value3
Running in verbose mode, the error is:
Function or format of input file requires 2 argument items
Changing the separator character from : to , in both files makes it work
though. So I suspect the separator functionality is broken.
Further, Having the separator character anywhere in the value field also
causes an error. Since ReadArray only processes two-dimentional arrays,
I don't see why that should cause an error as there is no ambiguity. It
seems to me that having:
key1,value,value
should set ${arrayvar[key1]} to "value,value".
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ReadArray,
Brendan Strejcek <=