in reply to Paranormal leakage of previous value from conditionally set lexical variable

Don't see why, but it seems to be a problem of precedence. Try:

my $workday = 0 if not $dow == 6 && not $dow == 7;

The way forward always starts with a minimal test.
  • Comment on Re: Paranormal leakage of previous value from conditionally set lexical variable
  • Download Code