Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use whatever value you wish as a hash value, including the name of another key. You can not, however, fail to quote the value, as it is not automagically quoted like the keys:</p> <pre><code>my %hash = ( abs =&gt; 'foo', xyz =&gt; 'abs' ); </code></pre> <p>Quoting a parameter preceeding <code>=&gt;</code> is optional, if it does not contain spaces. Quoting the parameter following it is not.</p> <p>You might also be interested to know that</p> <pre><code>[a,b,c,d] </code></pre> <p>will produce warnings, if you have warnings turned on (which you always should).</p> <pre><code>Unquoted string "a" may clash with future reserved word at Unquoted string "b" may clash with future reserved word at </code></pre> <p>The reason this still "works" is -- as far as I know -- for backwards compatibility, and you should always quote your strings. Furthermore, case in point, your bareword <code>abs</code> is actually mistaken for the built-in function <a href="http://perldoc.perl.org/functions/abs.html" rel="nofollow"><code>abs</code></a>, which in this case will try to find the absolute value of <code>$_</code>, and probably fail, returning 0 (and issuing a warning about undefined value in <code>$_</code>).</p> <p>What your array ref should look like is this:</p> <pre><code>['a', 'b', 'c', 'd'] </code></pre> <p>Or with a simpler syntax, using the <code>qw()</code> operator:</p> <pre><code>[ qw(a b c d) ] </code></pre> <p>You might also note that semi-colon <code>;</code> is not a valid character inside an assignment to a hash. The key/value pairs inside the parentheses shall be delimited with commas, nothing else.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload