On Sun Aug 01 07:19:06 2010, ekkehor...@googlemail.com wrote: > The script: > > use v6; > > my %fs = (); > > %fs{ lc( 'A' ) } = &fa; > sub fa() { > return 'fa called.'; > } > > ; > > %fs{ lc( 'B' ) } = &fb; > sub fb() { > return 'fb called.'; > } > > my $fn = lc( @*ARGS[ 0 ] || 'A' ); > printf "%s\n", %fs{ $fn }(); > > exit( 0 ); > > works as expected: > > PARROT E:\proj\xpl\perl6\archive\00 > perl6 -v > > This is Rakudo Perl 6, version 2010.07-47-g9fd5eaa built on parrot 2.6.0 > > Copyright 2008-2010, The Perl Foundation > > PARROT E:\proj\xpl\perl6\archive\00 > perl6 xpl02.pl6 B > fb called. > > but if I delete the lonesome ; in line 10, I get this error: > > PARROT E:\proj\xpl\perl6\archive\00 > perl6 xpl02.pl6 A > Could not find sub &fs > in main program body at line 12:xpl02.pl6 > > (I asked about this in de.comp.lang.perl.misc and was advised to submit a > bug report.)
This works now - can be closed with a test. -- Will "Coke" Coleda