I have a large list of servers in @servers that I loop through and run a command on.
Sometimes there will be something up with one of the servers and the command never finished which effectively hangs the script indefinitely. Is there a way to time this out after x amount of seconds?
Code:
chomp(@out = `/some/command`);
Sometimes there will be something up with one of the servers and the command never finished which effectively hangs the script indefinitely. Is there a way to time this out after x amount of seconds?