in reply to Re^2: issue with sprintf..
in thread issue with sprintf..

Or like this:

$Val2 = '0' x (11-length $Val2) . $Val2 if length $Val2 < 11;

or this

$Val2 = substr "00000000000$Val2", -11;