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