How to Read from stdin in Ruby

Fri, Aug 28, 2015

Read in 1 minutes

Reading from stdin in ruby is as easy as calling STDIN.read

STDIN.read.split("\n").each do |a|
   puts a
end

This will just print out everything handed in.

See Also

How to Read from stdin in Haskell

Wed, Dec 2, 2015

Read more →

How to Read from stdin in Cpp

Tue, Dec 1, 2015

Read more →

How to Read from stdin in Lisp

Wed, Nov 25, 2015

Read more →

How to Write Json in Ruby

Fri, Sep 11, 2015

Read more →

How to Parse Json in Ruby

Thu, Sep 10, 2015

Read more →