Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    my $hashref = { "key" => "value" };
    local *foo = $hashref;
    printf("keys=%d\n", scalar(keys(%foo)));
    
  2. or download this
    use strict;
    use warnings;
    ...
    local *foo = $hashref;
    printf("keys=%d\n", scalar(keys(%foo)));
    # prints: keys=0
    
  3. or download this
    use strict;
    use warnings;
    ...
    local *foo = $hashref;
    printf("keys=%d\n", scalar(keys(%foo)));
    # prints: keys=1