in reply to Keep file formatted
open (FILE,"$FORM{'TextFile'}"); @LINES = <FILE>; close (FILE); chomp(@LINES); foreach $line (@LINES) { foreach $variable (@variables) { if ($FORM{$variable} eq "") { print "incomplete!\n"; exit; } $line =~ s/<!--$variable-->/<STRONG>$FORM{$variable}<\/STRONG>/g; } $line =~ s/A\/an <STRONG>(a|e|i|o|u)/An <STRONG>$1/g; $line =~ s/a\/an <STRONG>(a|e|i|o|u)/an <STRONG>$1/g; $line =~ s/A\/an/A/g; $line =~ s/a\/an/a/g; print "$line\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Keep file formatted
by tommyw (Hermit) on Aug 08, 2002 at 11:11 UTC |