Command substitution in send/expect. Please help!

Hi, the following code is not working. How can I cat the last modified file in the path /asdf. Please help!

expect "asdf%" {send "cat `ls -rt /asdf|tail -1` \r"}

is that / before tail supposed to be a |?

Hi rn,
Yes, the / before tail is a |. Please help!