From: RobertGawron Date: 2010-01-22T07:31:41+09:00 Subject: Re: an elegant way to modify all lines from file by using map() function? Thanks On Jan 21, 11:23 pm, Glenn Jackman wrote: > At 2010-01-21 05:17PM, "RobertGawron" wrote: > > >  I'm new in ruby and I just have a question: in python when I want to > >  read all lines from file, do something with all of them and then use > >  them in my program I use map function + lambda function, sth like > >  that: > > >  print map(lambda u: u.upper(), open("foo", "r").readlines()) > >    puts File.readlines("foo").map {|l| l.upcase} > > -- > Glenn Jackman >     Write a wise saying and your name will live forever. -- Anonymous