For the past two days, I've been engaged in moving a CGI application\nfrom Windows to Linux, and boy, have I gotten an education! I would\nhave undertaken the project if I had know how frustrating it would be,\nbut I would have been a lot less enthusiastic going in.\n\nI have spend most of my time (so far) struggling with data input to\nMySQL, both schema and data. After hours of blind groping, I figured\nout the intricacies of mysqlimport, LOAD DATA FILE, and mysql -e\nbetween different versions and different OSes. Thank God for Perl -\-\nwriting simple scripts to munge the input files to read them into\nMySQL was both easy and fun, and effective.\n\nNow, I'm dealing with the differences between Perl versions, the one\non the Linux server is a lot older than the Windows server, but that's\nstraightforward. If something doesn't work, it's easy enough to fix by\nhand -\- unless someone knows of a library that translates from one\nversion to another.\n\nThe point of this post, other than just to blow off steam and take a\nbreak, is to share a couple of vi tips that I discovered. These have\nproven useful to me, and may to others, and besides, if I forget them\nI can simply google c.l.p.m.\n\nFirst, how to insert a non-printable character in a (vim) regular\nexpression? Let's say you want to replace form feeds (^@) with\nnothing. You can see the codes for characters by giving the\ncommand :digraphs, and then insert the character in the regular\nexpression by doing Cntl-k, two letter code.\n\nSecond, how to convert a simple, ASCII text file from Windows to\nLinux? The problem was an unfathomable premature end of script headers\nerror that I was at my wit's end to fix. In vi (vim), you give the\ncommand :set fileformat:unix, and presto, chango, the premature end of\nscript headers error disappears!\n\nYeah, I know this is OT, but I thought this might help someone else,\nand I needed to do something to relax anyway.\n\nCC.