- or download this
package Example::Tuple;
...
my( $self )= @_;
return "(" . join(",",@$self) . ")";
}
- or download this
require Example::Tuple;
my $origin= Example::Tuple->new( -3, 5 );
my $dest= Example::Tuple->new( 2, 1 );
print "Now draw a line from $origin to $dest.\n";
- or download this
Now draw a line from (-3,5) to (2,1).
- or download this
package Example::Tuple;
...
}
return 1; # Otherwise they are equal.
}
- or download this
require Example::Tuple;
...
if $w eq $y;
print "$x and $y are at different positions.\n"
unless $x eq $y;
- or download this
package Example::Tuple;
...
}
return __PACKAGE__->new( @new );
}