use WWW::Mechanize; $mech->get ("$url"); print Dumper $mech->content(); #This prints everything, I only want the div with id '#div_id_test'