From: Lee Jarvis Date: 2007-12-03T02:28:57+09:00 Subject: Re: Postfix to Infix (#148) Well, here is my submission.. I truly was stuck with this so I just done the most basic stuff, I will have a look through the other submissions a bit later to see how others done it.. #!/usr/bin/ruby -w argv = Array.new if ARGV.empty? puts "#{$0} " else ARGV.each do |a| if ['+', '-', '/', '*'].include?(a) last = argv.pop first = argv.pop argv << "(#{first} #{a} #{last})" else argv << a end end puts argv end I will try and mod the code to remove some parenthesis. Regards, Lee -- Posted via http://www.ruby-forum.com/.