Posts Tagged ‘Perl’

Using Perl and Regular Expressions to Process Html Files – Part 2

In this article we will discuss how to change the contents of an HTML file by running a Perl script on it. The file we are going to process is called file1.htm:Note: To ensure that the code is displayed correctly, in the example code shown in this article, square brackets ‘[..]‘ are used in HTML tags instead of angle brackets ”.[html][head][title]Sample HTML File[/title][link rel="stylesheet" type="text/css" rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outgoing/article_exit_link');" href="style.css"][/head][body][h1]Introduction[/h1][p]Welcome to the world of Perl and regular expressions[/p][h2]Programming Languages[/h2][table border="1" width="400"][tr][th colspan="2"]Programming Languages[/th][/tr][tr][td]Language[/td][td]Typical use[/td][/tr][tr][td]JavaScript[/td][td]Client-side scripts[/td][/tr][tr][td]Perl[/td][td]Processing HTML files[/td][/tr][tr][td]PHP[/td][td]Server-side scripts[/td][/tr][/table][h1]Summary[/h1][p]JavaScript, Perl, and PHP are all interpreted programming languages.[/p][/body][/html]Imagine that we need to change both… Read More

Free WordPress Themes Design by New WordPress Themes | Thanks to Insurance and Home Insurance