
GreetzFromWIT
New User
Sep 1, 2015, 9:06 AM
Post #5 of 6
(13942 views)
|
Re: [FishMonger] Recognition of numbers
[In reply to]
|
Can't Post
|
|
Yes, I did test this in a separate script using several input patterns but could never reproduce this behavior. As it may happen depending on the incoming data that $params_in->{resolve_until_release} will either not exist or be any string or be the empty string or even undef, I use the construct ($var || '') quite often in comparisons and pattern matching; that will eliminate one additional variable or one if clause or one condition and possibly some brackets for the rest of the conditions. I tend to think that this is easier to read, because it becomes clearer what actual problem is dealt with in the complete if-clause. But I agree that this is arguable. Anyway, thank you very much for your good advice, I will browse through my code and restructure all statements where $1/$2 are used so that they are only evaluated in the block after the condition and not inside the condition. Best regards, Mike
(This post was edited by GreetzFromWIT on Sep 1, 2015, 9:08 AM)
|