#!/usr/bin/perl # addwordspacing3.plx =head1 DESCRIPTION Program will read in an html file, append word spacing attribute to the in-line style and print in DOS window. =cut use warnings; use diagnostics; use strict; # Open HTML test file - forward slashes do not need to be escaped. open INFILE, "E:/Documents and Settings/Richard Lamb/My Documents/HTML/dummy.html" or die "$!: Can't open this file.\n"; while () { s/(/$1; word-spacing: 50px">/ig; s/(/$1; word-spacing: 20px">/ig; s/(

/$1; word-spacing: 20px">/ig; print; } close (INFILE); open (OUTFILE, ">E:/Documents and Settings/Richard Lamb/My Documents/HTML/dummy.html") or die("$!: Can't write to the HTML file.\n"); print (OUTFILE); close (OUTFILE);