Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Getting Involved with Perl 6 - 2009

by crumbly (Sexton)
on Jun 16, 2009 at 04:43 UTC ( #771872=note: print w/replies, xml ) Need Help??

in reply to Getting Involved with Perl 6 - 2009

I'm still a bit scared off by Perl 6 and haven't yet done much investigation. What would thaw the ice quite a bit is if there were a website that catalogued example code for doing basic things like,

  • opening a file, writing something to it, and closing it
  • reading in the list of files in a given directory
  • doing search/replace on a string
  • sorting and uniq'ing a list of strings
  • basics of using hashes
  • reading user input from stdin
  • writing a function
  • writing a simple class
  • accessing environment variables
  • etc.

My guess is that Perl 6 can do all sorts of amazing things, but I'd just like to see that it still makes easy things easy.

  • Comment on Re: Getting Involved with Perl 6 - 2009

Replies are listed 'Best First'.
Re^2: Getting Involved with Perl 6 - 2009
by citromatik (Curate) on Jun 16, 2009 at 06:30 UTC
    What would thaw the ice quite a bit is if there were a website that catalogued example code for doing basic things like,

    These examples may help you.


      This SVN repository now lives at, the one on is quite outdated. Even in the newer repository not all of these examples have been kept up-to-date with spec changes, which is why I'd recommend to look at the Perl 6 examples project instead.

      Update: to avoid confusion the outdated repo on has now been deleted.

        That examples project looks like a great start. If I knew how to use Git, and if I knew Perl 6, I'd add a directory to it called "the_basics", and put in the following files (to start):

        If anyone wants to beat me to it, please go ahead. Would make it a snap to get up to speed with Perl 6 in a hurry.

Re^2: Getting Involved with Perl 6 - 2009
by moritz (Cardinal) on Jun 17, 2009 at 15:26 UTC
    It might please you to know that currently a student is being paid by Google's "Summer of Code" project to improve documentation infrastructure and documentation for Perl 6.

    Parts of his project description:

    Start writing a tutorial (see Details section above) covering basic language constructs. Write documentation about basic Perl 6 features (as specified by Synopses 2, 3, and 4), like Perl 5's perlsyn, perlop, perlfunc, and perldata. Draw on material from the relevant Apocalypses and Exegeses as well.

    That should be enough to get you started, and you expect it to land mid or end of August.

Re^2: Getting Involved with Perl 6 - 2009
by crumbly (Sexton) on Jun 17, 2009 at 02:15 UTC
Re^2: Getting Involved with Perl 6 - 2009
by John M. Dlugosz (Monsignor) on Jun 16, 2009 at 15:18 UTC
    Why not try crafting those and posting the attempts? Others will happy point out mistakes. You can annotate the listing with pointers to the synopses or discussions of the language features.

    Some of those are squarely "library" and that's gotten much less attention than the core language.

    Some of those lead to very interesting discussions. E.g. "environment variables" are the default values of context variables, which have taken the place of global variables.

    "Perl 6 can do some amazing things" Indeed. here is one of my efforts along the lines of what I'm suggesting (which also shows reading of standard input, according to the latest decree).


      Why not try crafting those and posting the attempts?

      I'm not sure that answer makes sense here. If I was asking how to write something substantial, or even just something novel that requires a few lines of code, then it makes sense to ask me try things and post. But I'm just expressing a little curiosity about some rudimentary features of the language -- nearly trivial things to use as a reference point comparing how you'd do them in other languages. And also, making a thread about "Is this what an array looks like in Perl 6?" would probably not be of much general interest.

      Yeah, I guess I could start poring over the Synopses and figuring them out. But at that point I'd have invested some substantial time when all I really had been curious about was what the Perl 6 rudiments looked like.

      I guess I'm your typical "on the fence customer". If I can quickly see how easy things are easily done in Perl 6, then maybe I'll put in some time and give it a try. But at the moment, Perl 5 is working for me, and it's not easy to make free time, so I'll probably pass.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771872]
[erix]: my dog could do the classic mouse jump (never caught a mouse :)
[erix]: he caught a hare once (must have been a young one...)
virtualsue uses arcane git commands to resurrect a file, gets it back into shape and quits for the day
[GotToBTru]: a few years ago, when we had 3 dogs, the largest of them caught a chipmunk, but did not know what to do with it other than hold it in his mouth
[GotToBTru]: my wife told him to spit it out, so he did
[erix]: yeah, modern dogs are cute tjhat way :)
[erix]: except of course, the RHODESIAN LION HOUND ! :)
[Discipulus]: in roma cars are good mouser.. fortunnately no mouse at 7th floor..
[GotToBTru]: that's a name that should always be accompanied by a trumper fanfare
[GotToBTru]: trumpet, not trumper

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2017-11-17 20:01 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (272 votes). Check out past polls.