- or download this
use person;
...
$foo->name("Stefan");
$foo->age(20);
$foo->exclaim();
- or download this
$bar = Person->new();
$bar->name("Yoda");
$bar->age(900);
$bar->exclaim();
- or download this
$foo->name("Stefan");
- or download this
Person::name( $foo , "Stefan” );
- or download this
my $ref1 = { “name” => “Stefan”,
“age” => 20 };
my $ref2 = { “name” => “Yoda”,
“age” => 900 };
- or download this
$ref1 = bless $ref1 “Person”;
$ref2 = bless $ref2 “Person”;
- or download this
package Person;
require 5.004;
...
}
return 1;
- or download this
#!/usr/bin/perl
...
# See, it's still here
$foo->exclaim();
- or download this
my $foo->new( “Stephan”, 20 );
$foo->exclaim();
my $bar->new( “Yoda”, 900 );
$bar->exclaim();