Category: Perl

  • Installing ack on Windows with ActiveState Perl

    Search is important! Having a good tool for text search can lower or eliminate barrier, speed up work, and generally make life more enjoyable and fulfilling. That handy search tool, for me on Linux, has been ack for the past few years. One still needs to know some grep and regex. In fact, the more […]

  • Installing Perl DBI and DBD-mysql on Windows 64 bit

    I had trouble getting Perl DBI and DBD-mysql on Windows in the past. In addition, on Windows 64-bit, you sometimes see recommendations of using 32-bit Perl. Today I got to test the latest 64-bit ActiveState Perl distro for Windows, version I tested it on Windows 2008 R2 64-bit. I am happy to report that […]

  • Having fun with MySQL and Python: converting MySQL character set to utf8

    Lately I worked quite a bit with Python and Linux, writing monitoring and automation utilities. I am in a transition period, so I thought I ought to write some Python stuff interfacing with MySQL for fun, and start positioning myself for expanded career horizon, I hope. To get started, I thought it would be fun […]

  • Perl script to split sql script into separate files

    Below is a quick script I put together to split one single file that contains many stored procedures into many files that contain just a single stored procedure. It can be easily modified for views, user-defined functions, etc.. Notes: 1. It does put BEGIN and END before and after the procedure creation. Because some script […]

  • Generate insert scripts for SQL Server tables with Perl

    Here is a quick hack with Perl to generate insert statements to reproduce data already exist in a given table. It is similar to results mysqldump generates. A few things worth mentioning here: 1. This script uses a text file, TableList, that contains a list of tables that you want insert statements created. Each line […]