You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
281 B
Perl
20 lines
281 B
Perl
5 years ago
|
package Person;
|
||
|
|
||
|
use warnings;
|
||
|
use strict;
|
||
|
sub new {
|
||
|
my $self = {};
|
||
|
bless ($self, "Person");
|
||
|
return $self;
|
||
|
}
|
||
|
1;
|
||
|
|
||
|
|
||
|
#Now we can use our Person class to create an object:
|
||
|
#/usr/bin/perl
|
||
|
|
||
|
use warnings;
|
||
|
use strict;
|
||
|
use Person;
|
||
|
my $person = Person->new();
|