in reply to SSH and passphrase
Normally you generate a key-pair that has no passphrase. A passphrase thats coded into your perl script is no more secure than having none at all.