Hi,

can anyone give a hint, why ruby skips the input, when i run this 
following code?

thanks,
Markus

#!/usr/bin/ruby
def search()
    puts "Suchbegriff: ";
    search=gets;
    chop
    search = $_
    search = "Welt";
    ARGV.each do |test|
        File.open("#{test}", "r") do |afile|
            if (afile.gets =~ /#{search}/i)
                puts test.to_s
            end
        end
    end
end
search()