for ($a = 0; $a <=$count-1; $a++) { @size_local = $telnet->cmd("ls -ltr $src_cold/$list_files[$a] \|awk '{print \$5}'"); chomp @size_local; $size_remote = $ftp->size($list_files[$a]); print "$list_files[$a] $size_remote $size_local[0] \n"; if ($size_local[0] != $size_remote) { Log::it $log, "Difference in size of $list_files[$a] $size_remote in $host and $size_local[0] in $local.\n"; Log::it $eventfile, $msgstrng . "Difference in size of $list_files[$a] in $host and in $local.\n";