On Feb 24, 8:58  쮮
> * lionbarrage <cmakali... / gmail.com> (02:17) schrieb:
>
>
>
> > File 1
> > ALPHA|OMEGA|GAMMA
> > 1 | 2 | 3
> > 4 | 5 | 6
>
> > File 2
> > EPSILON|GREEK|OMEGA|BETA
> > 7 | 8 | 9 |  
> > 2 | | 3 |
> > 0 | 1 | 5 |  ±
>
> > End result should be:
>
> > ALPHA|OMEGA|GAMMA|EPSILON|GREEK|BETA
> > 1 | 2 | 3 |     
> > 4 | 5 | 6 |  ±  
> > | 9 | |A0  |  | 
> > | 3 | |A0 12 |  
>
> I hoped I fixed your ASCII art the right way.
>
> In understand that this represents named sets of integers that are to be
> merged. Right?
>
> The natural representation of that would be a hash containing sets.
> There is a set class, but I use arrays here:
>
> require 'pp'
>
> sets = Hash.new { | h, k | h[k] = [] } # hash that contains a newarray
>  for every new key
> %w(file1.txt file2).each do | filename |
> File.open(filename) do | f |
> names = f.gets.chop.split('|')
> f.each do | line |
>   >  >  
> end
> end
> end
>
> pp sets
>
> This code does no tabular printing, treats the "integers" as strings,
> without excluding empty strings and doubles. But that could easily be
> fixed.
>
> Probably I got it all wrong. :-(
>
> mfg,    
Thanks for fixing my art, looked fine in my screen but I guess the
translation was off.

I'm not too familiar with hashes but the code you wrote seems to be
doing it. Thank you so much!!

  How do i refer to a single element within a hash?  Let's say I want
11 for example.  Would I do sets["GREEK"][3]?

THANK YOU!