I am doing experiments between two computers which requires repeatedly inputting long commands. So I have to write a script on one host and use it to control the two machine. The script needs to run periodically.

I have no such kind of experience, so who can tell me how I should do or please give me some guidance to docs for reading. Great thanks. The scripts had better be in Perl.