{ sub a { print 1; } } a; A bug,is it? a should not be available from outside. Does it work in Perl 6*? * Sorry I don\'t have installed 开发者_如何学编程it yet.Are you asking why the sub is visib
I was looking at the silly/cute/brilliant \"sleep sort\" that seems to have originated over at 4chan. To sort an array of ints, the idea is roughly
In Scheme you can iterate over multiple lists in with for-each: > (for-each (lambda (a b) (display (+ a b)) (newline)) \'(10 20 30) \'(1 2 3))
Closed. This question is seeking recommendations fo开发者_StackOverflowr books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently acceptin
There\'s that (relatively) well known Perl axiom, \"Only perl can parse Perl.\" I\'m wondering, will that remain true for Perl 6?
#!perl6 use v6; my $longest = 3; my @list = <a b c d e f>; for @list -> $element is rw { $element = sprintf \"%*.*s\", $longest, $longest, $element;
#!perl6 use v6; my $m = 70; my $n = 30; ( $m div $n ).say; The first examples works, but the second doesn\'t. I suppose it\'s because in the second example the variable-values are strings. If my g
I tried this, but it didn\'t开发者_Go百科 work: $*OUT.autoflush( 0 ); $*OUT.autoflush = False should disable it, and it runs without error, but it seems that parrot\'s IO still flushes automatically.
Is there for perl6 already something to get the Terminalsize? ( for example like the 开发者_JAVA百科perl5 \"Term::ReadKey::GetTerminalSize\" );I\'m not aware of a direct method, but parsing qx/resize
#!perl6 use v6; my $list = \'a\' .. \'f\'; sub my_function( $list ) { for ^$list.elems -> $e { $li开发者_如何学Gost[$e].say;