graham,test require 'digest' while line = ARGF.gets("\n") do parts = line.split ',' next unless parts[1] print line.gsub parts[1], Digest::SHA1.hexdigest(parts[1]) end
record separator (default \n) - $, output field separator (default nil) - $; input field separator (default nil) - $_ current line - $. number of current line - $F result of $_.split($;) Ruby globals