#!/usr/bin/perl use strict; use warnings; use Net::SSH; open IN, ") { chomp; ssh_cmd('user@hostname', $command); ssh_cmd( { user => 'user', host => 'host.name', command => 'command', args => [ '-arg1', '-arg2' ], stdin_string => "string\n", } );