Help for this page

Select Code to Download


  1. or download this
    use v5.30;
    use strict;
    ...
    
    counter();
    say "getter => ", getter();
    
  2. or download this
    use v5.30;
    use strict;
    ...
    
    my $got = counter();
    say "got => ", $got;
    
  3. or download this
    {
      my $foo = 123;
    ...
        ...;
      }
    }
    
  4. or download this
    sub myfunc {
      state $foo = 123;
      ...;
    }
    
  5. or download this
    {
      my $foo;
    ...
        ...;
      }
    }