if($content=~m|(.*?)|si) { $content = $header_html . $1 . $footer_html; $content =~ s|%title%|$title|; &save_file("$fullpath",$content); print "Completed\n"; } else{ print "Couldn't parse\n"; } #### my $header_html= 'C:/My Documents/carlist/carlist_test/template/ccheader.html'; my $footer_html= 'C:/My Documents/carlist/carlist_test/template/ccfooter.html'; #### $content = $header_html . $1 . $footer_html;