Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: How to change these small one-liners into Perl6 code?

by LanX (Chancellor)
on Dec 23, 2012 at 02:06 UTC ( #1010063=note: print w/replies, xml ) Need Help??


in reply to Re: How to change these small one-liners into Perl6 code?
in thread How to change these small one-liners into Perl6 code?

> 1. For some reason, Rakudo does not recognize the "LOOP:" construct, I just can't use "goto LOOP" to jump to a label.

loop is a control keyword in perl6 replacing c-style For Loops, IIRC to avoid the confusion with Foreach Loops.

You can't use a keyword as a label.

Cheers Rolf

  • Comment on Re^2: How to change these small one-liners into Perl6 code?

Replies are listed 'Best First'.
Re^3: How to change these small one-liners into Perl6 code?
by ABCXYZ (Novice) on Dec 23, 2012 at 02:18 UTC

    >> 1. For some reason, Rakudo does not recognize the "LOOP:" construct, I just can't use "goto LOOP" to jump to a label.

    >loop is a control keyword in perl6 replacing c-style For Loops, IIRC to avoid the confusion with Foreach Loops.
    >You can't use a keyword as a label.

    But I was using "LOOP:" instead of "loop", the interpreter should have distinguished them.

      oops sorry, no idea!

      the perl6 wizards are certainly soon back!

      (x-mas is a very symbolic date for them ;-)

      Cheers Rolf

        It's fine. Thank you all the same!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010063]
help
Chatterbox?
[Lady_Aleena]: Sanity check please? push @line, ref($list_addition ) eq 'ARRAY' ? @$list_addition : $list_addiction; # so I don't have the change existing uses of the sub.
[shmem]: $list_addiction should be $list_addition
Discipulus loose the tozzetto party!
[shmem]: .oO( addition of cookies for addiction to cookies )
[Lady_Aleena]: Other than my typos shmem. 8)
[shmem]: otherwise fine
[Discipulus]: tozzetti & vinsanto
[Lady_Aleena]: The whole line is push @line, ref($list_addition ) ? @$list_addition : $list_addition if $list_addition;
[Lady_Aleena]: And I forgot to do the array check, I'm such a doofus today.
[Lady_Aleena]: push @line, ref($list_addition ) eq 'ARRAY' ? @$list_addition : $list_addition if $list_addition; #trying again

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-04-27 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (503 votes). Check out past polls.