in reply to Problem with data retrieved from Net::SSH:perl

my (@out1, $err1, $exit2) = $ssh->cmd("df -k");

isn't likely to ever work... because you can't have an array as the first thing in a multiple value return. an array in the first slot would suck up all of the values passed back from the subroutine. The Docs say as much. this is what you'll need to do:

my ($out1, $err1, $exit2 = $ssh->cmd("df -k"); my @out1 = split /\n/, $out1; ...