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

Re: [PBML] Help with variable

Expand Messages
  • Shawn Corey
    ... That depends on whether you are doing in Perl or in a shell. In Perl, only / and (I missed this one) need be escaped by placing a backslash in front
    Message 1 of 9 , Oct 5, 2005
    • 0 Attachment
      Ray Brannam wrote:
      > Actually that is not quite correct, there are many characters that need
      > escaping e.g. <spaces>, ',",\,| to name a few.

      That depends on whether you are doing in Perl or in a shell. In Perl,
      only '/' and '\' (I missed this one) need be escaped by placing a
      backslash in front of it. This is because Perl uses them as directory
      separators. '/' is from UNIX and '\' is from MS DOS; Perl uses both
      interchangeably.

      In a shell, that depends on the shell. I would not recommend using it
      from a shell since the variable is tainted. I could call it something
      like 'foo; rm -rf / 2>/dev/null' with very unpleasant results. See
      perldoc -q taint


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