Wheres my "0" keep going??

I have been trying to send a modbus package to an old and dusty plc of mine using my bright shiny new arduino, but the arduino keeps dropping the “0” off the front of some of my commands why??
The command I am using is serial.print(01, HEX) but the 0 takes a trip to the beach or something!!

You could send it as a string instead.
Leading zero suppression will always drop, well, leading zeros.
If leading zeroes are significant, you could write a very simple function to ensure they’re always printed.

IN C/C++, a 01 literal is interpreted by the compiler as an OCTAL constant. In this case, the value one.

The better way might be to output two characters for each byte. The caveman coding way:

Serial.print("0123456789abcdef"[(value >> 8) & 0x0f], BYTE);
Serial.print("0123456789abcdef"[value & 0x0f], BYTE);

Thanks for your replys, adding an extra byte worked perfectly except that it upset the checksum, btw the “caveman way of doing things” really suited me. thanks.