in reply to Efficient solution needed for this program
Why did you export the table to XML? Exporting it to a tab separated file is much more convenient! Then you could use the following oneliner:
perl -a010F -lpe "$_=join qq(\t),qq('$F[0]'),'=>',qq('$F[1]')"
or more verbosely:
#!/usr/bin/perl -w use strict; while (<>) { chomp; my @columns = split /\t/; printf "'%s'\t'=>\t'%s'\n", @columns; };
|
|---|