Created
May 19, 2010 15:28
-
-
Save azurestone/406429 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Person; | |
| sub new { | |
| my ($class,$args) = @_; | |
| my $self = bless $args, $class; | |
| return $self; | |
| } | |
| sub self_introduction { | |
| my $class = shift; | |
| print 'My name is ' . $class->{name} . '.'; | |
| print 'I am ' . $class->{age} . ' years old.'; | |
| } | |
| 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment