#!/usr/bin/perl -w use Ring; use GirlFriend; use strict; my $gf = GirlFriend->new(); my $ring = Ring->new(); print "I love my ", ref( $gf ), " ", $gf->{name}, "...\n"; print "So I gave her this ", $ring->{ring}, " ", ref( $ring ), "\n"; print "She's the best...\n"; print " She said yes...\n"; print " She makes me want to sing\n\n"; print "\t\t\t-Kel :)\n"; #### #!/usr/bin/perl -w package Ring; use strict; sub new { my $class = shift; my $self = { }; if ( !( $class ) ) { die "Usage: 'Ring->new()'\n"; } bless $self, $class; $self->{ring} = "Pretty"; return $self; } 1; #### #!/usr/bin/perl -w package GirlFriend; use strict; sub new { my $class = shift; my $self = { }; if ( !( $class ) ) { die "Usage: 'GirlFriend->new()'\n"; } bless $self, $class; $self->{name} = "Beth"; return $self; } 1;