Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: langi
  • Order by date
  1. langi

    Perl with CSV file

    cntr, I think the variable a isn't needed in String#parse_csv: class String def parse_csv self.scan( /(?:"((?:(?:\\.)*[^"\\]*)*)"|([^,]*))(?:,|$)/ ).flatten.compact end end
  2. langi

    comparing two arrays

    I'm not that good in programming Perl, but here is how I'd do it in Ruby: #!/usr/bin/ruby arr1 = [] arr2 = [] begin File.open('alldata.txt') { |f| f.each_line { |line| arr1 << line.split(/\s+/) } } File.open('tworesponses.txt') { |f| f.each_line { |line| arr2 <<...
  3. langi

    weighted matching library

    I've installed amatch as a RubyGem. The only documentation I found was the 'amatch.txt.en' file in the directory of the amatch gem. This file says that amatch calculates the Levenstein distance of two strings.

Part and Inventory Search

Back
Top