Find/Replace Perl Script to Modify .HTM files on server (telecommute), United States, FL, Naples
[email protected] (Perl Jobs)
| Newsgroups | perl.jobs |
|---|---|
| Message-ID | <[email protected]> |
Online URL for this job: http://jobs.perl.org/job/4844 To subscribe to this list, send mail to [email protected]. To unsubscribe, send mail to [email protected]. Posted: October 26, 2006 Job title: Find/Replace Perl Script to Modify .HTM files on server Company name: Posleap, Inc. Location: United States, FL, Naples Pay rate: $20 US (one time fee) via Paypal Travel: 0% Terms of employment: Independent contractor (project-based) Length of employment: 30-60 Minutes Hours: Flexible Onsite: no Description: I need a perl script which modifies all .htm files located in the ~/userhelpguides.com/guide directory on my server. The perl sript needs to recursively find all the .htm files in the directory, make the changes listed below, and then save the new file as a .php ----- 1) You need to remove all the junk (whatever it may be, ie.. stylesheets, etc) above the first <table> tag, but before you do, you need to: Replace the <title>sometitlehere</title> tags with: <?php $title = "sometitlehere"; include $_SERVER['DOCUMENT_ROOT']."/test/head.php"; ?> Where 'sometitlehere' is the previous title specified between the <title> tags. (I'm using a PHP include to pass in the title to another php page). 2) Next, replace the first <table..*> tag with simply <table>. The table tag varies document to document, so you need to do a match for all <table ..*> 3) Finally, remove the ending </body></html> and replace with: <?php include $_SERVER['DOCUMENT_ROOT']."/test/foot.php"; ?> All the files can be found at: http://userhelpguides.com/whatyouneed.zip Here are example files on the server (contained in the zip file above): http://userhelpguides.com/t/a3.htm is an example of an unmodified page. http://userhelpguides.com/t/a3-modified.php is how the page should look after modification http://userhelpguides.com/t/head.php is the header http://userhelpguides.com/t/foot.php is the footer. Thanks! Josh Required skills: Perl Desired skills: Perl Contact information at: http://jobs.perl.org/job/4844#contact