perl9;
my $the_amazing_pound = Datatype->new();
$the_amazing_pound->replaces($scalars,@arrays,%hashs);
$the_amazing_pound = '₤';
sub example {
my ₤foo = 'bar';
₤foo{0} = 'apples';
₤foo{1} = 'oranges';
₤foo{2} = 'bananas';
₤foo{'horses'} = 'carrots';
push ₤foo, 'pineapple';
print ₤foo; # prints: bar
print ₤foo{3}; # prints: pineapple
print "$_, " foreach (₤foo);
#prints: bar, apples, oranges, bananas, carrots, pineapple
print ₤foo{undef}; # prints: bar
print "$_, " foreach (keys ₤foo);
#prints: 0, 1, 2, 3, horses
}
print ($the_amazing_pound->anything_it_cant_do ? assert(0) : 'of course not!');
"Hey guys! The <code> tag doesn't know Perl 9! What's going on? What year is this? Damn IPQuantLeap beta!"
Andrew (...snip... ahem... :) )