My First Perl Script AGAINST Kingword.

I’ve been loving C for so long and I decide to make some naughty change now. ;-)  I begin to learn Perl, which is designed to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal), exactly opposite to C.  I learned Perl because:
  1. It’s beneficial to the project I’m working on.  My project heavily involves text manipulation, for which Perl was originally developed.
  2. It’s beneficial to a PM.  Perl is efficient at building demo code to show prototypes.

It’s Kingword that pushes me to start my Perl career from such a poor script, a script less than 10 lines.  Before I upgraded from Kingword2005 to Kingword2006, I exported (one feature of Kingword) my NewWord list to a txt file whose format is defined by Kingword2005.  Then, when I tried to import them back to the NewWordPad of Kingword2006, it failed because Kingword2006 can only import txt files in a new format newly defined by Kingword2006.  It feels like the government persuade me to trade my gold for the currency, but some day later, the government issues a new kind of currency and the one I hold can not be used any more.

So I decided to fight against Kingword, by writing a Perl script transforming the old format to the new one.  I did and it works well. :-)