On 7/17/06, Chris Dawson <[EMAIL PROTECTED]> wrote:
Now, I want to run this from within ruby.  I assumed I could do this:
    IO.popen "perl  -e 'while( <> ) { push @stuff, $_; }; print @stuff'" do |p|
    end
But, this just hangs.  Any suggestions, or an explanation why the

i perused the popen method description and found it opens pipes in
read-only mode by default. add a mode="w+"

IO.popen("perl  -e 'while( <> ) { push @stuff, $_; }; print @stuff'",
mode="w+") do |p|
 ...
end
_______________________________________________
PDXRuby mailing list
[email protected]
IRC: #pdx.rb on irc.freenode.net
http://lists.pdxruby.org/mailman/listinfo/pdxruby

Reply via email to