in reply to decimal to binary convertion

That's not actually "decimal to binary". That's "number to binary". We've gone through this before here... see Super Search.

For larger values, you'll have to use Math::BigInt.

-- Randal L. Schwartz, Perl hacker