in reply to Re: Warnings:
in thread Uninitialized value in string warnings (was: Warnings:)
I re-read the perlvar stuff, but I still don't understand the significance of the change from $a/b to $u/v?
The code given is only an example, the real code uses descriptive variable names and has other constant info around the two vars.
I had found perldiag, but was hoping for a quick way of finding a particular message, something like the perldoc -q re that works for perlfaq?
The My $c = "$a$b" is a gross simplification of the real line. The problem is that the value of $b is set (or not) with the same compound statement. For me to ensure that it has a value requires me to break the compound statement into a loop in order to intercept and test the value of $b before using it, which I was hoping to avoid.
However, I wasn't aware of the ||= operator, it will be useful in other situations. Thanks.
|
---|