Standard output redirection from a variable

Hi, trying to store a comand involving a redirection in a variable and then run this variable. But the redirection gets lost.

Ex:
#!ksh
MYCMD="ls -l > dirlist.txt"
$MYCMD

This runs the command but displays the result in the terminal instead of redirecting it to the text file.

Can this be done?

MYCMD="ls -l"
$MYCMD > dirlist.txt

MYCMD="ls -l > dirlist.txt"
eval "$MYCMD"

here's what I'm trying to do:

							\#

To Bandit390: Simple and effective - sometimes simple things are just too obvious to be seen.
To cfajohnson: This does the trick. I never used the 'eval' command. I just learned something.
Now my biggest problem is to decide which solution I will use :smiley:
Thank you very much to both of you.