NEW: Perl 6 'Diwali' 6.d Language Specification Released!

This is the second major language release. Read the release announcement

The Perl 6 Programming Language


Hi, my name is Camelia. I'm the spokesbug for Perl 6, the plucky little sister of Perl 5. Like her world-famous big sister, Perl 6 intends to carry forward the high ideals of the Perl community. Perl 6 is currently being developed by a team of dedicated and enthusiastic volunteers. You can help too. The only requirement is that you know how to be nice to all kinds of people (and butterflies). Go to #perl6 ( and someone will be glad to help you get started.

Jump in!

Rakudo is a compiler for Perl 6 code. Install it and you're all set to run Perl 6 programs!

Download Rakudo Perl 6

Many new features greatly advance our tradition of expressive and feature-rich programming

  • Object-oriented programming including generics, roles and multiple dispatch
  • Functional programming primitives, lazy and eager list evaluation, junctions, autothreading and hyperoperators (vector operators)
  • Parallelism, concurrency, and asynchrony including multi-core support
  • Definable grammars for pattern matching and generalized string processing
  • Optional and gradual typing
grammar Parser {
    rule  TOP  { I <love> <lang> }
    token love { '' | love }
    token lang { < Perl Rust Go Python Ruby > }

say Parser.parse: 'I ♥ Perl';
# OUTPUT: 「I ♥ Perl」 love => 「♥」 lang => 「Perl」

say Parser.parse: 'I love Rust';
# OUTPUT: 「I love Rust」 love => 「love」 lang => 「Rust」
start { sleep 1.5; print "hi" }
await Supply.from-list(<A B C D E F>).throttle: 2, {
    sleep 0.5;

# No floating point noise:
say 0.1 + 0.2 == 0.3;        # OUTPUT: True
say (1/13 + 3/7 + 3/8).perl; # OUTPUT:  <641/728>
# Infinite list of primes:
my @primes = ^.grep: *.is-prime;
say "1001ˢᵗ prime is @primes[1000]";

# Lazily read words from a file
.say for '50TB.file.txt'.IO.words;

Want to see more? Visit Perl 6 examples page

Recent Blog Posts [view more] RSS