Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
> The {} and [] operators construct new aggregates each time they are evaluated.

This might come as a surprise but literals in Perl are always new as you can see by the references.

DB<66> p \1 SCALAR(0x335c4a0) DB<67> p \1 SCALAR(0x335c6f8) DB<68> p \1 SCALAR(0x335cae8) DB<69>

I know there are languages where it's always the same (IMHO do Ruby and Lisp have a syntax for this) but this is not what I mean or asked.

Alas ... few of the respondents here seem to have read the code in the OP and really have a deep grasp of aliases.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

) well undef is an exception, but it's debatable if that's a literal or a constant.

DB<69> p \undef SCALAR(0xfb9098) DB<70> p \undef SCALAR(0xfb9098) DB<71> p \undef SCALAR(0xfb9098) DB<72> p \undef SCALAR(0xfb9098) DB<73> p \"str" SCALAR(0x335d3c0) DB<74> p \"str" SCALAR(0x335d498) DB<75> p \"str" SCALAR(0x335d270)

In reply to Re^2: Shouldn't references be readonly? by LanX
in thread Shouldn't LITERAL references be readonly? (updated) by LanX

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2023-03-23 08:44 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.