From: Sloan Ruby Date: 2013-02-14T07:30:23+09:00 Subject: file size of each item in file list I am trying to take the contents of a file which contains the results of a file size search and print those out with ruby. To obtain the file size of each line in that file. #!/usr/bin/ruby f = File.open("/tmp/lg_files") contentsArray=[] # start with an empty array f.each_line {|line| a = contentsArray.push line #b = File.size(a) puts a } This results in each line in the file /tmp/lg_files printing. -- Posted via http://www.ruby-forum.com/.