in reply to Re^2: running setuid for ssh ?in thread running setuid for ssh ?
use 5.006 ; # 4 won't cut it [download]
If you change that use line in your copy of Expect.pm, you could try your version of Perl and, who knows, it might work.
There's also the option of installing a separate Perl to run your Expect-based program from. Perl doesn't take up a lot room, considering.