Help for this page

Select Code to Download


  1. or download this
    my $globref = \*GLOB;
    *$globref = sub { print "Glob\n" };
    GLOB();
    
  2. or download this
    my $globref = \do { local *GLOB };
    print $globref, "\n"; # prints GLOB(0x.......)
    *$globref = 1;
    print $globref, "\n"; # prints SCALAR(0x.......)