#!/usr/bin/perl my $s = "info info . info <div id=\"inner\"> \n blah blah blah"; $s =~ s/.*<div\ id="inner">//si; print $s