constant.pm was first part of 5.6.0

Not true!

% /usr/bin/perl -v This is perl, version 5.005_03 built for i386-freebsd Copyright 1987-1999, Larry Wall [...] % cat c1 #! /usr/bin/perl -wl use strict; use constant C => 1; use constant A => [qw/a b/]; use constant H => {qw/a b/}; print C; print A; print A->[0]; print H; print H->{a}; % /usr/bin/perl c1 1 ARRAY(0x8057c18) a HASH(0x8057c3c) b

Prior to 5.005_03, constant hashes and arrays didn't work so well, but scalars did. I think scalar constants go all the way back to 5.000 (perhaps you've been tricked by the use 5.006_00 in the source code of later releases)?

FreeBSD 5.2 ships with 5.6.1, and I think 4.9 does as well.


In reply to Re:x5 Web Site Mapper (perl, use constant on FreeBSD) by grinder
in thread Web Site Mapper by hardburn

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.