
mhx
Enthusiast
/ Moderator
Mar 23, 2002, 7:49 AM
Post #3 of 3
(52836 views)
|
perl -ne'printf("%02X ",ord)for(split//);' filename First of all, you can get rid of another three characters by stripping all those needless parentheses and the semicolon:
perl -ne'printf"%02X ",ord,for+split//' filename Using -F won't help much, it's score is equal:
perl -naF'' -e'printf"%02X ",ord,for@F' filename But using a simple regex will save some three characters again:
perl -ne'printf"%02X ",ord,for/./sg' filename -- mhx
At last with an effort he spoke, and wondered to hear his own words, as if some other will was using his small voice. "I will take the Ring," he said, "though I do not know the way."-- Frodo
|