in reply to Perl6, modifying @*INC
BEGIN{ push @*INC, 'C:\Rakudo\lib';}
Add a space before the opening curly: BEGIN { @*INC.push( 'C:\Rakudo\lib' );}
The reason is that {...} directly after a statement is parsed as a postcircumfix, which is very handy if you want to access hash elements like %hash{$key} (but which is intentionally not special-cased to hashes).
The error message could be improved, though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl6, modifying @*INC
by molecules (Monk) on Aug 05, 2010 at 16:17 UTC | |
by moritz (Cardinal) on Aug 05, 2010 at 16:23 UTC | |
by molecules (Monk) on Aug 05, 2010 at 17:09 UTC |