title: Using Net::Telnet::Cisco and Net::Ping to skip unreachable hosts
body: <p>I am writing a script that goes through a few hundred Juniper routers and runs some commands to display using Net::Telnet::Cisco; however, some of the routers in the list are unreachable stopping the script through a Timeout.  </p>
  
  <p>Is there a way to skip the unreachable devices?  Maybe using the Net::Ping mod?</p>
  
  <p>The message I recieve:</p>
  
  <pre><code>[user@server LSP]$ perl lsp_down_script.pl 
  problem connecting to "&lt;router-name&gt;", port 23: Connection timed out at lsp_down_script.pl line 21
  &lt;table border=1&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;[user@server LSP]$ 
  </code></pre>