Ok that makes good sense. First off all let me say that I am a NOOB

when it comes to programming in general except when dealing with Windows batch files (if you even want to call that programming) I'm trying to get better and learn how to program with ruby. This is the code that I have so far, keep in mind I haven't even tried to attempt the whole loop storing '192.168.1.' in a string etc. etc. The code I have is VERY simple and unorthodox I'm looking for someone to give me some assistance in cleaning this mess up. I would like the output in my output file to be on the same line. For example:
Noah: True
Gideon: True
This is what I have because I don't know the syntax on how to accomplish the same line output, im thinking its something simple.
I'm getting this:
Noah:
false
Gideon:
false
etc. etc.
If anyone could give me some reference code on how to accomplish the loop way of pinging the entire networks IP range I would be very grateful as I would like to ping all my machines and not just my servers. Thanks So Much in advance.
CODE
#This will ping the specified IP address and return to a file if they are up or down.
require 'ping'
require 'resolv-replace'
f = File.new("PingServers.txt", "a")
f.puts Time.now
f.puts "If True, Server is UP, YAY!. If False, Server is DOWN! FIX IT!."
f.puts " "
f.puts "Noah: "
f.puts Ping.pingecho('192.168.1.6, 200')
f.puts " "
f.puts "David: "
f.puts Ping.pingecho('192.168.1.7, 200')
f.puts " "
f.puts "Moses: "
f.puts Ping.pingecho('192.168.1.18, 200')
f.puts " "
f.puts "Gideon: "
f.puts Ping.pingecho('192.168.1.23, 200')
f.puts " "
f.puts " "
f.puts " "
f.close