I really have to question why you're writing a script for KSH and not using a more popular shell such as bourne or BASH ?
Ignoring that .... Maybe this will clear some things up:
Code:
$ set -A someArray `ls *.jpg`
$ echo ${somearray[*]}
blah.jpg
something.jpg
file.jpg
aa.jpg
$echo ${somearray[0]}
blah.jpg
make any sense?
If you're going to use a variable to store the contents of the output of an application you need to put it in these backquotes ` `