Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Using Perl packages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Using Perl packages
Authored by: juanfal on Jan 17, '07 01:45:03AM
The Terminal way (easy also for calling from AppleScript, etc). It can be use via scrapbook (copy/tinyurl.pl/paste) (as I mostly do) or via command arguments:
#!/usr/bin/env perl
#
# tinyurl.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";
    }
}


[ Reply to This | # ]