-2
#!/usr/bin/expect -f
spawn telnet 10.123.9.111
expect login {send username\r}
expect password {send password\r}
----Here i want to execute commands----
----Commands are stored in an array in example.pl script----
----All variables are global in perl script----
----After executing these commands, control should again transfer to the called perl script----
어떻게 만들 수 있습니까? 이것이 올바른 방법일까요? 아니면 더 좋은 방법이 있을까요?스크립트간에 제어를 전송하는 방법은 무엇입니까?