object orientation :- please help

2002-01-18 Thread padu hagu
hi, I am newbie at Perl. I have written the following code in perl :- sub point { # point(x,y) constructor my ($x, $y) = @_; return ( 'x' => $x, # components 'y' => $y, 'show' => sub { # display method my %p = @_; print "point at $p{'x

object orientation in perl

2002-01-18 Thread padu hagu
hi, I am newbie at Perl. I have written the following code in perl :- sub point { # point(x,y) constructor my ($x, $y) = @_; return ( 'x' => $x, # components 'y' => $y, 'show' => sub { # display method my %p = @_; print "point at $p{'x