Very close -- I think you meant:
$conduit_random = sprintf("%04d",int(rand(9999)));
What you had was the equivalent of just
$conduit_random = int(rand(9999)); For reference, compare these:
perl -le '$x = (1,2); print $x'; # prints 2
perl -le '($x) = (1,2); print $x'; # prints 1