parsing vCards

In my continuing migration to Google-everything, I wanted to migrate my Mac OS X address book to Google Mail. Importing contacts into Google Mail requires that the entries be in CSV; the OS X.4 Address Book only exports in vCard (.vcf) format.

I didn’t want to spend a bunch of time learning the vCard format or writing a little one-off parser. Fortunately, I came across the very handy Text::vCard and Text::vCard::Addressbook modules.

Here’s a simple Perl script for handling this conversion. Currently, it imports the following information (if present in your vCard entries):

Last Name
First Name
Middle Name
Home address
Work address
Work phone
Home phone
Cell phone


  1. Select all your contacts from Mac OS Address Book and export them.
  2. Run the perl script fetched from above (you will need Text::vCard::Addressbook installed): /path/to/vCard_file.vcf > addresses_for_google.csv
  3. Import the addresses_for_google.csv into your GMail account

Expanding VMWare disk images

I created Fedora Core 5 disk images for use as virtual machines to host our database freezes. Unfortunately, I created them with only 5GB to start with – barely enough to even host the tarballs.

This helpful post had all the information I needed.

In short, to expand the size of the disk partition, use vmware-vdiskmanager:

vmware-vdiskmanager -x 25gb fedora-fc5-i386/fedora-fc5-i386.vmdk

To convert it into a growable disk image::

vmware-diskmanager -r disk.vmdk -t 1 new.vmdk

To allocate and resize the partitiion, boot the vmx, then start the Logical Volume Management tool.

Building Perl 5.8.8 on x86_64

I’ve been having a bear of a time building Perl 5.8.8 on x86_84. After much Googling and trying to recreate the build parameters that Red Hat used for the supplied 5.8.5, I finally stumbled on the answer.

Basically, the Configure script isn’t smart enough to guess the lib directories for x86_64 are all stored under /lib64, /usr/lib64, or /usr/local/lib64.

So to build Perl, bypassing the interactive mode:

sh Configure -des -Dlibpth=”/usr/local/lib64 /lib64 /usr/lib64″