in reply to Process File Different Way Based on Passed in Argument

In each case of:

If ($foo = "bar") {...}

...there are two errors.

  1. It should be spelled "if", not "If".
  2. It uses "=", which assigns a value to $purpose when it should be using "==" "eq", which compares a string value to $purpose.

Update: Fixed the == vs eq problem. Thanks for those who pointed it out.


Dave

Replies are listed 'Best First'.
Re^2: Process File Different Way Based on Passed in Argument
by Athanasius (Archbishop) on Jan 22, 2016 at 02:40 UTC

      Absolutely. Good catch. :)


      Dave