Help for this page

Select Code to Download


  1. or download this
    package a;
    
    ...
    }
    
    my $obj = new a ();
    
  2. or download this
    my $obj = "a"->new();
    
  3. or download this
    $obj ->{$self}{avalue}=10;
    print $obj->{$self}{avalue};
    
  4. or download this
    {
      package a;
    ...
    my $obj = "a"->new();
    $obj->avalue(10);           # set
    print $obj->avalue, "\n";   # get
    
  5. or download this
    {
      package a;
    ...
    my $obj = "a"->new();
    $obj->avalue(10);           # set
    print $obj->avalue, "\n";   # get