Help for this page

Select Code to Download


  1. or download this
    ${ *{${ns} . '::foo'} } = $cram;
    
  2. or download this
    ${ $::{$ns.'::'}{foo} } = $cram;
    
  3. or download this
    #!/usr/bin/perl -l
    use strict;
    ...
    __END__
    $Teddy::foo: cheese
    ${ $::{$ns}{foo} }: bar
    
  4. or download this
    print grep /Teddy/, keys %::;    # Teddy:: 
    print $::{'Teddy::'};            # *main::Teddy::
    print keys %{$::{'Teddy::'}};    # foo
    print $::{'Teddy::'}{foo};       # *Teddy::foo
    
  5. or download this
    $::{'Teddy::'}{foo} = \'cheese';
    
    print $Teddy::foo;    # cheese
    $Teddy::foo = 'bar';  # "Modification of a read-only value attempted a
    +t ..."