I'm not talking about your script. I just answered your implied question "I don't see where I can use this functionality with the two choices you mentioned to pick from" in your last post.
After looking at your script I see that the problem is that when you call process("DATE1=20111111:20111112"), your script will execute the first 'unless' (which will put a scalar value into $where{DATE1}) and then execute the last 'if' block (which will try to put a reference into $where{DATE1}).
The problem is evident from your script output (it prints "normal value: 20111111:20111112" and it shouldn't do that, right?). If you had put a few Data::Dumper statements into the subroutine it would have been even more conspicuous.
So evidently Anonymous Monk was right