"Jonathan e. paton" wrote:
>
> Agreed, however there is more that can be done. You want
> to filter out non-matching lines ASAP, so you apply full
> substitutions when there is a good chance of needing one.
>
> I suggest the following for the loop:
>
> while(defined(<READ>)) {
>
> # Limit substitutions to lines with either "cure" or
> "Cure".
> if (/[Cc]ure/) {
> s/\.Cure/\.fa/g;
> s/cure-/fa-/g;
> s/class=Cure/class=fa/g;
> }
This might help. If /[Cc]ure/ isn't found you only execute one regular
expression, if it is you execute four.
> # Limit substitutions to lines with "window.name"
> if (/window\.name/) {
> s/window.name!=\"frSheet\"/false/g;
> }
This won't help at all. You always execute one regular expression and
two if the first one matches.
> print WRITE;
> }
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]