#!/usr/bin/env rubyfile = File.open( "myFile.txt" )file.each { |line| print "#{file.lineno}. ", line }file.close