Help for this page

Select Code to Download


  1. or download this
    sub to_string {
        my $self = shift;
        return "$_->{num}/$_->{den}";
    ...
    sub to_num {
        my $self = shift;
        return $_{num}/$_->{den};
    
  2. or download this
    sub to_string {
      my $self = shift;
    
    ...
    
      return $self->{num} / $self->{den};
    }