>>>>> "G" == Gavin Sinclair <gsinclair / soyabean.com.au> writes: G> def get_local_gz_files G> files = {} G> Dir["*.gz"].each do |filename| G> files[filename] = File.stat(filename).size G> end G> files G> end svg% cat b.rb #!/usr/bin/ruby def get_local_c_files Hash[*Dir["*.c"].map do |filename| [filename, File.stat(filename).size] end.flatten] end p get_local_c_files svg% svg% b.rb {"st.c"=>10714, "range.c"=>10706, "enum.c"=>11250, "util.c"=>22676, "sprintf.c"=>12332, "re.c"=>38877, "version.c"=>1094, "random.c"=>6485, "object.c"=>34530, "class.c"=>17870, "main.c"=>988, "compar.c"=>2720, "array.c"=>43170, "process.c"=>30792, "io.c"=>82748, "dln.c"=>39614, "variable.c"=>35056, "time.c"=>32796, "string.c"=>69845, "regex.c"=>123352, "numeric.c"=>36979, "inits.c"=>1765, "dmyext.c"=>20, "dir.c"=>21761, "signal.c"=>13318, "pack.c"=>39965, "math.c"=>6199, "hash.c"=>39087, "error.c"=>25114, "parse.c"=>348857, "ruby.c"=>22725, "marshal.c"=>27620, "lex.c"=>4480, "bignum.c"=>34051, "struct.c"=>15141, "prec.c"=>1677, "gc.c"=>34935, "file.c"=>58392, "eval.c"=>219839} svg% Guy Decoux