Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Basic transformations

by mjscott2702 (Pilgrim)
on Nov 29, 2010 at 11:47 UTC ( #874231=note: print w/replies, xml ) Need Help??


in reply to Basic transformations

This seems to work, combining hex and chr - I'm sure it could be shorter:

use strict; use warnings; while(<DATA>) { chomp; my @hex_chars = split; map { print chr(hex($_)); } @hex_chars; print "\n"; } __DATA__ 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21

Output:
Hello, world!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://874231]
help
Chatterbox?
[stevieb]: ohhh, aaaand, I just learned that you can power an Arduino (Uno at least) by connecting any single analog pin to 5v on the Pi GPIO! That's bloody handy

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2017-06-22 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.