My copy of "The Perl 5 Programmer's Reference"

Has a review here: The Perl 5 Programmer's Reference. I think I saw it in a store or some illegal copy somewhere on the net, and it is barely more than the perldoc that came with perl.

says it uses DES. It's from 1997. Next time I'll double check with perldoc.

Just ran a search for "DES" on my local POD for perl 5.18.1 (from 2013), and got only one match: perlcygwin allows to compile perl with -lcrypt, explicitly mentioning DES: "The crypt package distributed with Cygwin is a Linux compatible 56-bit DES crypt port by Corinna Vinschen."

Since the book is from 1997, and is essentially a printed perldoc, a Perl version from that time should mention DES.

perl 5.004, dated 15 May 1997 (first from 1997 on CPAN)
perlfunc says: "Encrypts a string exactly like the crypt(3) function in the C library", no trace of DES. Not even a brute force search is successful, only tons of false positives (DESTROY, DESCRIPTION).
perl 5.003_07, dated 10 Oct 1996 (the oldest one on CPAN)
perlfunc has the same text, and the search has again only false positives.

So, where does the DES information come from?

A really brute force search across all perl versions on perl5.git.perl.org has quite a few matches with many false positives and many test scripts, but none before 1997-12-24. Perl 5.003_07 has only false positives, i.e. no trace of DES in Perl 5.003_07. Older versions have been excluded by the git brute force search.

The Win32/cygwin ports had DES for ages, using a third party DES crypt() implementation. But for other systems, DES is not mentioned (or at least I did not find any hints.)

So the book must be either wrong (assuming crypt implements DES for all operating systems) or badly worded (making you think Win32 DES crypt or DES crypt in some libc apply to all operating systems).

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^4: replacing password in a file by afoken
in thread replacing password in a file by manasmita_nayak

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.