#!/usr/local/bin/perl
use LWP::Simple;
print "Content-Type: text/html\n\n";
print "<html><title></title><body>\n"; # some browsers might get confused w/o this line
$url = 'http://www.dhs.gov/dhspublic/';
$content = get $url;
$content =~ /(<img\sname=\"dhsadvisory\"\ssrc=\")\/(dhs\/images\/.*?\">)/;
$firstchunk=$1;
$secondchunk=$2;
$url2='http://www.dhs.gov/';
$wholechunk = $firstchunk.$url2.$secondchunk;
print "<p><p>\n";
print $wholechunk;
print "\n</body></html>\n";
exit;
Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.
If you're not already familiar with forums, watch our Welcome Guide to get started.
Join over 807,865 other people just like you!