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

Note Tab and Perl

Expand Messages
  • erinntaylor9
    I am trying to write a simple perl replace function for Note Tab, but I am having difficulty getting the correct syntax. I have included my current code and
    Message 1 of 1 , Nov 8, 2002
    • 0 Attachment
      I am trying to write a simple perl replace function for Note Tab, but
      I am having difficulty getting the correct syntax. I have included
      my current code and output, and what the actual output needs to be:

      current code:
      while (<>)
      {
      $replace = $_;
      $replace =~ s/(1)/(2)/g;
      print "$replace";
      }

      to be modified:
      1 one (1)
      2 two (2)

      current output:
      (2) one ((2))
      2 two (2)

      desired output:
      1 one (2)
      2 two (2)

      Any help would be greatly appreciated!
      Thanks.
    Your message has been successfully submitted and would be delivered to recipients shortly.