perl -ane '$|?($F[1]=~/complex.\d/and$a{$&}=$F[0]):($b{$F[0]}=$F[1]);$ +|||=eof}{print"$_ $b{$_} $a{$_}\n"for keys%b' file1 file2
In reply to Re: How can I merge data using a hash? (golf it)
by ccn
in thread How can I merge data using a hash?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |