in reply to Re: conditional definition of variables
in thread conditional definition of variables

unless ( defined $var) { my $var = "zzz\n" } and you will get predictable behavior, but, probably, not what you want.
To expand on what you said, the OP should note that, since the my $var inside the unless has nothing to do with the my $var outside, so this code would leave the outer $var alone, whether or not it's defined. As mentioned by betterworld, just omitting the second my (whether you use the unless in modifier or BLOCK form) gives the (probably-)desired effect of modifying the outer $var.