Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Compiling and uploading a crontab to my Radioduinoby cavac (Parson) |
on May 30, 2021 at 09:56 UTC ( [id://11133299]=note: print w/replies, xml ) | Need Help?? |
Oh, yes. It's badly named. This function actually turns the bytes (which ARE bytes) from the binary packet frame into "cavac-encoded" half-bytes for serial transmission. So, $highbyte (which should actually be $highnibble or something) can't go over 255). The reason i'm using this encoding is because it's dead simple to turn it back into real bytes, while allowing proper framing for transmitting over serial.
perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
In Section
Cool Uses for Perl
|
|