Nick's answer is correct. But you should also remember that except in highly controlled environments, ls is not something you should use to populate variables with filenames. There are a number of other ways to pick a single filename.
[ghoti@pc ~]$ ls -l foo*
-rw-r--r-- 1 ghoti wheel 0 Apr 16 21:01 foo bar.txt
-rw-r--r-- 1 ghoti wheel 0 Apr 16 21:01 foo.txt
[ghoti@pc ~]$ test1=`for i in foo*txt;do echo $i; break; done`
[ghoti@pc ~]$ echo $test1
foo bar.txt
[ghoti@pc ~]$ test2=`find . -name foo\*.txt -print | head -1`
[ghoti@pc ~]$ echo $test2
./foo.txt
[ghoti@pc ~]$
Obviously, not all methods will return files in the same order.
Also be mindful of filenames that begin with a hyphen. :-)
${directory_contents[0]}?