Loading ...
Sorry, an error occurred while loading the content.

Modify during a while statement

Expand Messages
  • techybill
    Hey all Trying to modify a html file with a while statement and can t see to get it to work just right. Here s what I m trying to do $change .=
    Message 1 of 1 , Sep 2, 2003
    • 0 Attachment
      Hey all
      Trying to modify a html file with a while statement and can't
      see to get it to work just right. Here's what I'm trying to do


      $change .= s/\%%$option_d_name%%/ ${$option_v_name}/g,;
      # $changes will be multi lines
      open (FILE, "<./$location") ||
      &errorcode(__FILE__, __LINE__, "./
      $location", "$!", "print", "FILE OPEN ERROR", "0");

      while (<FILE>)
      {
      $changes;
      s/\%%$option_d_name%%/ ${$option_v_name}/g;
      #why does s/\%%$option_d_name%%/ ${$option_v_name}/g; work,
      # but $changes does not?

      $database_fields[$db{"options"}] .= $_;
      }
      close (FILE);
      }

      Thanks
    Your message has been successfully submitted and would be delivered to recipients shortly.