Although I've been convinced that Perl is far from an ideal language to work with, I was required to recently do some text processing with it. Some strings seemed equal but apparently weren't because my code wasn't behaving as desired.

Essentially one can pass the value of a string to print_codes() and it will print the codes for each character (including invisible ones) in the string.

In my case, we determined that 1. the input string was in UTF-16 (from a Gmail .csv export) but was being compared to a UTF-8 string, and 2. chomp was only removing \n and was leaving \r. Makeshift solutions for those issues:

Remove extra \0 characters from the UTF-16 strings (careful if you deal with other languages, though):s/\0//g;

14:25, 9 December 2010:Update: Office 2011 is now available on the Home Use Program (HUP) site!

For those who qualify and have Macs, you've probably been wondering when Office 2011 will be available for the Microsoft Home Use Program. After some research on 26 October (when it was released for retail) turned up nothing, I sent a few emails and got this as a reply:Thanks for your question. Office for Mac 2011 is expected to be available through the Home Use
Program in December 2010.

Let us know if you have any further question, thanks!
-Brittany
Further investigation revealed the Benefit Administrator FAQ from Microsoft (PDF or Google HTML cache), which contains the following statement on page 4:

"Office for Mac 2011 will be made available worldwide on December 9, 2010."

This shows how to open the login window files. It requires Apple's Developer Tools, which can be downloaded here for free if you have a free developer account.

I don't completely understand how the login window elements work together, so anyone with more knowledge can chime in through comments and I'll update this post. I do know these steps have worked since Jaguar (10.2) with some tweaks to the file location and without the compiled .nib file errors introduced with Snow Leopard's spring cleaning.

I recommend making a backup of the original .nib file. That way, if you somehow mess up and the login screen will not let you in, you can alway start up in Single User Mode and replace the copy with the backup. I also did all the changes through my root user so I didn't have to authenticate every change I made.

Navigate to /System/Library/CoreServices/SecurityAgentPlugins/

Right-click on loginwindow.bundle and choose "Show Package Contents".

In the new window that opens, navigate to Contents/Resources/English.lproj/. If LoginWindowUI.nib shows as a folder, open and close Interface Builder, thus associating the .nib filetype.

Open LoginWindowUI.nib and begin editing.

In Snow Leopard, the first time you do this, you will get the below error. Look here for information on how to get around this.

"The document "LoginWindowUI.nib" could not be opened. Interface Builder cannot open compiled nibs. Try opening the source document instead of the compiled nib."

When trying to run a new shell script in bash, you may get the following error:-bash: ./samplescript: Permission denied
Navigate to the file and type the following:sudo chmod u+x samplescript
You should then be able to run said file by typing this:./samplescript

These are instructions to change your default command line editor in Snow Leopard.

Create or edit a file in your home directory called .profile (make sure you include the ".") using TextEdit or the editor of your choice. Note that files beginning with a period are invisible in Finder, so to use TextEdit you may have to open it with Terminal using the following command:open ~/.profileIf you get the following error, the file does not yet exist and needs to be created:The file /Users/randomuser/.profile does not exist.

Add one of the following lines to the file based on your preferred editor:

emacs:export EDITOR=/usr/bin/emacs

vi:export EDITOR=/usr/bin/vi

TextEdit (may have side effects):export EDITOR=/Applications/TextEdit.app/Contents/MacOS/TextEdit

These are instructions to quickly and easily install MySQL on Snow Leopard, and will also work on Lion. I won't discuss mysqladmin or any other configurations on this post beyond those necessary to get the MySQL server running.

Let the .dmg file download, then open it. There should be a file called something similar to mysql-5.1.52-osx10.6-x86.pkg. Open it.

Click through the installer with the default settings. The installation took about 10-15 seconds.

The files install in /user/local/mysql/, so we need to set PATH variable to look in there. Create or edit a file in your home directory called .profile (make sure you include the ".") using TextEdit or the editor of your choice.

Add this line to the file:export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

You can then start the MySQL server by installing the prefPane (instructions below) or opening the Terminal and typing the following:

sudo mysqld_safe &

MySQL should now be installed and ready to use.

Optional installs:

Install MySQL.prefPane. This has GUI on/off switch and startup options:

Return to the mounted disk with the MySQL installer.

Double-click on MySQL.prefPane. It will install after you authenticate.

Install Sequel Pro. This is a free full-featured GUI interface for database creation/maintenance: