Help for this page

Select Code to Download


  1. or download this
    sub set_attr {
        # 0 self
    ...
        # 1 attr
        $_[0]->{$_[1]}
    }
    
  2. or download this
    sub set_attr {
        my $self  = shift;
    ...
        my $value = shift;
        $self->{$attr} = $value;
    }
    
  3. or download this
    sub addNums {
        # 0 self
    ...
        # 2 value
        $_[0]->{$_[1]} = $_[2];
    }
    
  4. or download this
    sub capitalize {
        my ($word) = @_;
        $word = "\u$word";
        return $word;
    }
    
  5. or download this
    sub capitalize {
        $_[0]="\u$_[0]";
    }
    
  6. or download this
    $word = captitalize($word);
    
  7. or download this
    captitalize($word);