in reply to Re^2: Non-Formula based Text Encoding - with Compression
in thread Non-Formula based Text Encoding - with Compression

You all are just showing everyone you really don't understand Perl that well.
split / */

Cough… cough…

For my part, I liked jeffa’s version. Comments are always better as Pod. I’m not quite sure what “non-formula” means in this context. Is it a technical term related to encryption (not my forte)?

Replies are listed 'Best First'.
Re^4: Non-Formula based Text Encoding - with Compression
by GotToBTru (Prior) on Apr 16, 2015 at 18:43 UTC

    My guess is this is "non-formula" in that there is a lookup instead of evaluating a function that uses the plaintext contents. Excessively simple example of Caesar cipher:

    $plaintext = 'Attack at dawn!'; # formula - very simple encoding function foreach $chr (split //,$plaintext) { $ciphertext .= chr(ord($chr)+1) } print $ciphertext,"\n"; $ciphertext = ''; # non-formula # only need to do this next step once, then store hash somewhere to us +e when encoding foreach $letter ('A'..'Z','a'..'z',' ','!') { $shifted{$letter} = chr(ord($letter)+1) } foreach $chr(split //,$plaintext) { $ciphertext .= $shifted{$chr} } print $ciphertext, "\n";
    Dum Spiro Spero
Re^4: Non-Formula based Text Encoding - with Compression
by Aldebaran (Curate) on Apr 20, 2015 at 07:15 UTC

    How do you get the comments to display when they are in POD format?