Posting to WP from commandline is great. Before I post it, I need to lookup available categories so that I can categorize the new post correctly. To prevent a visit to WP admin GUI, I used the same Perl module for posting to retrieve available categories. Below is the code. I hope it helps you too..
use WordPress::XMLRPC; my $o = WordPress::XMLRPC->new({ username => 'username', password => 'password', proxy => 'http://yourblog-address/xmlrpc.