From: Martin Boese Date: 2008-07-09T21:34:13+09:00 Subject: Re: Piping data in on the command line Just read the IO $stdin, like: $stdin.each { |line| puts "Found: #{line}" } The < "operator" is a shell feature that will pass the content of a file to the programs standard input (stdin). martin On Wednesday 09 July 2008 08:22:15 James Coglan wrote: > Hello all, > > I know you can get command line args using ARGV, but is there a way to use > the '<' operator to pipe data into your program, as in > > ruby myprog.rb < ~/myfile.txt