With much hard work I have come up with a new package... Crypt::1337, I feel it is my duty to give back to the community and what better than a new form of encryption only idiots could use? Now, keep in mind this is an alpha version, and does lose a bit of formatting... but returns messages in readble format...
package Crypt::1337; use base Exporter; @EXPORT = qw(to_1337 from_leet); sub to_1337 { my($str) = lc $_[0]; $str =~ s/\bto\b/2/g; $str =~ s/ate/8/g; $str =~ tr/letasbgo/13745690/; $str; }; sub from_leet { @str = split /(\s+)/, lc $_[0]; for (@str) { next if /\s/; $_ = 'to' if $_ == 2; $_ = 'a' if $_ == 4; next if(/^\d+$/ && $_ !~ /3?1337/); s/8/ate/g; s/8/to/g; tr/13745690/letasbgo/; } join '', @str; }
and for an example script....
use Crypt::1337; my $enc = to_1337("This is a test, later\n"); print $enc; my $unenc = from_leet($enc); print $unenc;
Enjoy your 1337 h4ckin9.

This is, of course, a joke... :)

                - Ant
                - Some of my best work - Fish Dinner


In reply to New Package Crypt::1337 by suaveant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.