set Net:SSH:Expect timeout and set it again.

SSHing into a machine can take a few seconds, but after I'm in, the commands return quickly. I was wondering if the timeout setting can be changed once I'm logged into the machine. Does anyone know if this can be set on the fly? The problem here is, if I have to set timeout = 10, it'll take 10 seconds for each command I send to the machine. That all around sucks. All responses will be greatly appreciated.

Perhaps the problem can be improved all around; why are you using expect with ssh when you can send entire remote shell scripts noninteractively and without needing perl at all?