From: Wes Gamble Date: 2006-03-22T08:00:47+09:00 Subject: Newbie: Printing hex formatted string using printf I am trying to print the hex representation of a string using printf. $stderr.print "Magic number is: #{magic_number}.printf('%X')\n" Why does this not work? The output is: Magic number is: %PDF-1.3.printf('%X') -- Posted via http://www.ruby-forum.com/.