- or download this
my $person = Person.new(:life(100), :attack(1), :spell(2));
$person.weapons<a> = Weapon.new(:name<sword>, :powerLow(3), :powerHigh
+(5) );
$person.weapons<s> = Weapon.new(:name<spell>, :powerLow(0), :powerHigh
+(7) );
- or download this
given my $person = Person.new(...) {
given .weapons {
...
.<b> = Weapon.new(...);
}
}
- or download this
given my $person = Person.new(...) {
.weapons = {
...
b => Weapon.new(...)
};
}
- or download this
my $person = Person.new(
...,
...
b => Weapon.new(...)
}
};
- or download this
my $socket = Socket.new(
localport => 80,
...
my @users = slurp '/etc/passwd' :chomp;
my @even = 2..10 :by(2);