check out sprintf() and ord() quickly for you example: ## hex perl -e 'printf("%x", ord("\n"))'
## oct perl -e 'printf("%o", ord("\n"))' > -----Original Message----- > From: James Edward Gray II [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 12:49 PM > To: [EMAIL PROTECTED] > Subject: Converting to Hex > > > Is there a simple way, like a one liner perhaps, that will > give me the > octal/hex value of a character? I need to look certain > characters up, > so I would like to be able to give it something like an 'a' or even > "\n" and have it answer 141 or 012 (assuming UNIX). Thanks for your > time. > > James > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]