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.
12 lines
262 B
Perl
12 lines
262 B
Perl
5 years ago
|
#First we create an anonymous hash,
|
||
|
#then bless it into a package
|
||
|
|
||
|
package House;
|
||
|
|
||
|
my $ref = { "Owner"=>"Tom",
|
||
|
"Price"=>"25000", # Properties/attributes
|
||
|
};
|
||
|
bless($ref, House);
|
||
|
|
||
|
print "\$ref is: $ref.\n";
|
||
|
print ref($ref), ".\n";
|