chomp @FILE; my $every_command = join '', map { "$_\r\n" } @FILE; print $sock $every_command;