#!/usr/bin/perl # Usage: extractImdbUrls.pl < scriptOutput.txt while () { print "http://www.imdb.com/title/$1/\n" if /(tt\d+)/; }