Help for this page

Select Code to Download


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