On Dec 18, 2009, at 10:15 PM, Glenn Little wrote:

> If you meant what you typed and it wasn't a typo, the pipeline
> is backwards.  Should be:
>
>  % head -n 1 file.txt | my_utility.rb

OK. Still, I see no values in ARGV -- which seeing the line above, it  
would make sense. I'm no longer trying to pass an argument to  
my_utility, so I must have to pick up the piped input in some other way.

So, back to Matt's input (no pun intended, ar-ar)...

Instead of ARGV I use STDIN.gets, and it works.

Thanks guys.

-- gw


-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to