Oliver Bandel wrote:
> Hello,
>
>
> The Code:
>
> ====================================
> def look_for_begin
>    while line = gets
>      if line =~ /^begin/
>        puts line
>        # return
>      end
>    end
> end
>
> ARGF.each { look_for_begin }
> ====================================

puts ARGV.map{|f|IO.readlines(f).find{|s|s=~/^begin/}}