HaHaHa,
There must be tons more of this stuff out there, as soon as I get a gap I am going to search for it.
-----
Of all the things I've lost in my life, its my mind I miss the most.
In my quest recently to find a way of encrypting and decrypting a string in perl. I came accross this GEM of a web site Infrequently Asked Questions About Perl
I was searching for "perl string decrypt" and came across this page that has this
How do I decrypt a string that I encrypted with crypt()?I thought I had struck gold. This is exactly what I had been looking for, for hours.
I looked at the code in his solution and thought ... jeesh I am going to need to concentrate on this.!..
This is what it looked like.
A Warning even followed.sub decrypt { my $c = shift; my @c = (0) x 8; for (;;) { my $i = 0; my $s = join '', map chr, @c; return $s if crypt($s, $c) eq $c; $c[$i]=0, $i++ while $c[$i] == 255; return undef if $i > 7; $c[$i]++; } }
Warning: Exporting this function outside the USA may be illegal under the provisions of ITAR.
I loaded the code into my editor and as I was about to start I noticed the question below the one I was interested in,How do I get my perl program to run faster?
No!!! It can't be... I have never seen those used before...use more 'cpu'; use less 'time'; use more 'speed';
It was only then that I started to read the page from the begining...
My best is...
How do I get tomorrow's date?
Use this function:sub tomorrow_date { sleep 86_400; return localtime(); }
There must be tons more of this stuff out there, as soon as I get a gap I am going to search for it.
-----
Of all the things I've lost in my life, its my mind I miss the most.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl Humor
by JaWi (Hermit) on Sep 20, 2002 at 10:29 UTC | |
Re: Perl Humor
by BrowserUk (Patriarch) on Sep 20, 2002 at 10:48 UTC | |
by davorg (Chancellor) on Sep 20, 2002 at 10:59 UTC | |
by BrowserUk (Patriarch) on Sep 20, 2002 at 15:46 UTC | |
by zengargoyle (Deacon) on Sep 21, 2002 at 00:21 UTC | |
by CountZero (Bishop) on Jan 05, 2005 at 22:36 UTC | |
by mem (Acolyte) on Sep 21, 2002 at 15:01 UTC | |
by John M. Dlugosz (Monsignor) on Sep 20, 2002 at 20:20 UTC | |
Re: Perl Humor
by Anonymous Monk on Sep 20, 2002 at 13:20 UTC | |
by tretin (Friar) on Sep 20, 2002 at 18:29 UTC | |
by nefertari (Chaplain) on Sep 20, 2002 at 23:02 UTC | |
by John M. Dlugosz (Monsignor) on Sep 20, 2002 at 20:25 UTC | |
Re: Perl Humor
by Django (Pilgrim) on Sep 20, 2002 at 12:01 UTC | |
Re: Perl Humor
by Django (Pilgrim) on Sep 20, 2002 at 19:20 UTC | |
Re: Perl Humor
by Abigail-II (Bishop) on Sep 25, 2002 at 13:54 UTC | |
Re: Perl Humor
by gmpassos (Priest) on Sep 21, 2002 at 01:23 UTC | |
by Aristotle (Chancellor) on Sep 21, 2002 at 09:06 UTC | |
by blakem (Monsignor) on Sep 21, 2002 at 10:29 UTC | |
Re: Perl Humor
by jeorgen (Pilgrim) on Sep 22, 2002 at 17:20 UTC |
Back to
Meditations