From: Patrick Spence Date: 2006-05-16T00:59:07+09:00 Subject: Search an array Given the following scenario... $0 = "C:/mhiqTest/testAdoConnection.rb" $@[0] = "c:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb:57:in `connect'" $@[1] = "c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:424:in `connect'" $@[2] = "c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:215:in `connect'" $@[3] = "C:/mhiqTest/testAdoConnection.rb:16" How can I search the callstack array; $@, for the element that contains the currently running program; $0? The idea is to log all the errors to a SQL Server database, the name of the program, line number where the error occurred, error message, etc. Thanks! -- Posted via http://www.ruby-forum.com/.