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

Click here to return to the 'A Perl script to create Tiny URLs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A Perl script to create Tiny URLs
Authored by: natebeaty on Feb 22, '07 10:39:47AM

Here's a modification of the Ruby script above for urlx (formatted as a TextMate command, replace ENV["TM_SELECTED_TEXT"] with ARGV[0] and print with puts for a shell command..)

#!/usr/bin/env ruby
require 'net/http'
require 'uri'

url = URI.parse('')
res = Net::HTTP.start(, url.port) {|http|
print res.body

[ Reply to This | # ]