Help for this page

Select Code to Download


  1. or download this
    package main;
    {
    ...
        *main::foo = sub {print "Foo\n"}
        foo();
    }
    
  2. or download this
    package main;
    sub foo {print "Foo\n"}
    
  3. or download this
    use strict;
    use warnings;
    ...
    
    # Verify the change:
    print $s->id_get, ": ", $s->name_get, "\n";
    
  4. or download this
    creating sub Student::name_get
    creating sub Student::name_set
    ...
    
    1234: John Doe
    1234: Mark Doe