in reply to Writing to a file: problem
I think this may be what you want. Printing to the outfile in the loopopen (OUTFILE, ">E:/Documents and Settings/Richard Lamb/My Documents/H +TML/dummy.html") or die("$!: Can't write to the HTML file.\n"); print (OUTFILE); close (OUTFILE);
open (OUTFILE, ">E:/Documents and Settings/Richard Lamb/My Documents/H +TML/dummy.html") or die("$!: Can't write to the HTML file.\n"); while (<INFILE>) { s/(<h[1-6]\s+style=.*)">/$1; word-spacing: 50px">/ig; s/(<li\sstyle=.*)">/$1; word-spacing: 20px">/ig; s/(<p style=.*)">/$1; word-spacing: 20px">/ig; print OUTFILE $_; } close (OUTFILE);
|
|---|