I wonder why you want to do that. This almost always unneeded in Perl, because Perl usually does the conversion for you. Internally, numbers are used as binary numbers and Perl usually computes with double-precision floating-point values. When you enter a number in decimal format, Perl usually stores it in binary format (well, in some cases, it might initially store it as a string if Perl does not know that it is supposed to be a number, but it will do the conversion when you use that string as a number, for example in an arithmetic operation). When you are trying to "convert" numbers either way, you actually don't convert them, you are only converting string representations of these numbers. When you write:
my $value1 = 255;
my $value2 = 0377; # 377 octal, equal to 255 decimal
my $value3 = 0xff; # FF hex, same as 255 decimal
my $value4 = 0b11111111; # also 255 decimal
all these values are the same to Perl.
The only thing for which I can see the conversions you are trying to do to be useful is for input and output of special representations of those numbers. Or, of course, for training purposes but you will not have to use that very often.
I can remember of one single case where I had to do that in Perl, for modeling a game with white and black stones where is was convenient to represent the game board (and the moves) with 16-bit integers, where, for example, a 0 would represent a white stone and 1 a black stone (still, although my program was using heavily the bit-wise operators, I needed binary representation only for the purpose of displaying conveniently debugging information, the program itself did not need it).
The octal representation is sometimes needed for such thing as Unix file permissions. Sometimes you might use bit vectors and need to see what it looks like, or need to visualize individual bits for other low level operations, but it is still rather uncommon in day to day Perl programming to need to use the binary representation of numbers.