So instead, here's a small Perl program that takes the contents of the clipboard (if no arguments are provided) or converts each argument into a Tiny URL, and then prints the Tiny URL version to the standard output.
#!/usr/bin/env perl
#
# testtinyurl.pl
#
# juanfc 2006-06-30
#
#
use WWW::Shorten::TinyURL;
use WWW::Shorten 'TinyURL';
if (!@ARGV) {
$small = makeashorterlink(`pbpaste`);
system("echo -n $small | pbcopy" );
print "$smalln";
} else {
foreach $a (@ARGV) {
print makeashorterlink($a), "n";
}
}
As you can see you need WWW::Shorten::TinyURL, and this was the first problem for me since...
sudo perl -MCPAN -e 'install WWW::Shorten::TinyURL'
...failed in tests and couldn't install it. Finally, I found one to download on Dave Cross' CPAN page. When you install it, be careful with the place it wants to install. It will try to install into /Library -> Perl -> 5.8.6 -> lib -> perl5 -> site_perl -> WWW. That is wrong; you must move it to /Library/Perl/5.8.6/WWW/.
[robg adds: I haven't tested this one...]

