#!/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----
どうすれば作れますか?これは正しい方法ですか?または、これを行うためのより良い方法はありますか?