From: David Cruz Date: 2006-05-05T07:21:59+09:00 Subject: Re: Ruby equivalent to simple awk program ------=_Part_14490_4505256.1146781317147 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > input =3D (ARGV.length>0) ? File.new(ARGV[0]) : $stdin > arr =3D [] > input.each_line { |line| arr << line } > arr.reverse_each { |line| puts line } > input.each_line { |line| arr.unshift line } it saves an iterator ------=_Part_14490_4505256.1146781317147--