in reply to Is this code correct

> How to assign an uninitialized variable with a proper value ?

you probably(?) want $a //= $sixth;

edit

i.e. $a = $sixth if not defined $a;

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery