title: Minimum bytes required to represent a signed hexadecimal value
body: <p>Can anyone tell me is there any function in Perl which converts signed decimal to Hex with minimum number of bytes.</p>
  
  <p>ex: -555(dec) => FFFFFDD5(hex) [ converted using $Hex = sprintf( "%X", -555 )]</p>
  
  <p>I want the result to be FDD5 instead of FFFFFDD5.</p>
  
  <p>2 bytes are enough to represent -555.But i am getting 4 bytes conversion.</p>
  
  <p>Please help!</p>