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.

22 lines
375 B
Perl

package Person;
use warnings;
use strict;
sub new {
my $class = shift;
my $self = {@_};
bless($self, $class);
return $self;
}
1;
#!/usr/bin/perl
use Person;
my $object = Person->new (
surname => "G",
forename => "G",
address => "Apts.",
occupation => "tester"
);
print "This person's surname: ", $object->surname, "\n";