What happens is that, the same value in $x seems to be cached once when sub1 is called and when sub1 is called again, the $x seems to be set with the same value even when it is not expected to be! Thanks, Ganeshsub sub1 { .. my $x = $y if ( <some condition> ); .. }
In reply to "if" in a my declaration statement causes problem by ganeshk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |