Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Modules to reduce syntax?

by LanX (Saint)
on Dec 22, 2021 at 14:44 UTC ( [id://11139833] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    >> ref={foo: {x:42}}
    Object { foo: {} }
    ...
    42
    >> ref['foo'][bar]
    42
    
  2. or download this
    >> $ref={foo: {x:42}}
    Object { foo: {} }
    
    >> $ref['foo'][$bar]
    42
    
  3. or download this
      DB<3> $ref = {foo=> { x => 42 } }
    
    ...
    42
      DB<6> p $$ref{foo}{$bar}
    42
    
  4. or download this
      DB<11> use experimental 'refaliasing'; \%ref = $ref
    
      DB<12> p $ref{foo}{$bar}
    42