#!/usr/bin/perl -w use strict; my @getdata; while(){ chomp; if ( /href=http/ ){ @getdata=split/\w+\s+|<|>|"|href|=/; } } print "$getdata[9]"; __DATA__ Go to the BBC's website BBC or you can visit the inland revenues pages at Inland Revenue which will give you the information you need