From the “why-do-I-need-Perl-any-more” department…

PHP now provides perl-like regex functions, and writing websites has never been so much fun! I have always loved Perl for text parsing of any kind, and I realize that was because of its powerful regex functionality. During some recent PHP contract work for my friend John, I discovered that PHP’s got perl regex, via this…

preg_match( $perl_style_regex, $source, $match_result_array ).

I can scrape like a madman now. Happy happy joy joy. Anyone who disparages PHP has either never used it or has been trained in the pretentious ways of the Java prima donna. (JUST KIDDIN’ yall!) 😛

The easiest way I came up with was to use Vista’s “Windows Contacts” as a gateway.

  • Sync your Treo with the Palm Desktop.
  • Export contacts from the Palm Desktop as a CSV file, keeping track of the exported columns and names (yuck).
    • After exporting, I had to open the CSV file and remove all question marks in the contact names before the next step would work (doh).
    • After discovering that most carriers require you to dial 10 digits these days, I did a regex replace to add my area code to all 7-digit phone numbers.
  • Import into Windows Contacts, adjusting the mapping using the list of fields from the export (yuck).
  • Open iTunes and connect your iPhone.
  • Click on the Device, and select the Info tab.
  • Scroll down to the Contacts section, and select [x] Sync contacts with Windows Contacts.
  • Sync up! iTunes will warn you if you’re trying to import a lot of contacts.
  • I turned off the Windows Contacts sync after the import, I won’t be using it.

Wow, now I have a whole bunch of crappy old contacts in my iPhone, yay! :> At least Windows Contacts managed to remove duplicates, something I could never accomplish with my Palm/kpilot/etc. syncing.

The WordPress iPhone app is, as are all things Automattic, a beautiful elegant thing. Posts can now fly like pigs with wings (as soon as I learn to type). And my iPhone apps are on the way…

I now have a shiny new RoundCube 0.3 install, thanks gentoo! And I bumped up the server with an [emerge -Davu world] as well. A glorious new day. :>

The gory details follow. (continued…)

Ordered and received…

  • Macbook Pro 17″ with 3.08GHz, 500GB-7200RPM, anti-glare-screen
  • iPod Touch 8GB
  • OS X 10.6 (Snow Leopard)

Next I’ll get…

  • iPhone 3GS

Here are all the notes on setting these puppy dogs up… (continued…)