Perl 6 is many things. For one, it includes a language I'll call STD. STD is specifically designed to host other languages including ones I'll call Pure Perl 5 (a new Perl 5 parser) and #p5p perl (Pumpkin Perl). In your comment you explore STD but then reject everything, which means you've thrown the babies (Pure Perl 5 and #p5p perl hosted alongside Pure Perl 5) out with the bathwater.

Maybe you can reconsider the bathtub so you can at least look forward to using Pure Perl 5 (which supports $/ as input record separator, $0 as the executable name, and so on) running on android or in a browser and supporting parallel processing and so on.

So the matches are in the object named $/ (OK, so $/ meant something in Perl5, let's change that!)

If you want $/ as the input separator, use a Perl 5.

I agree with @Larry (the team who designed the Perl 6 STD language) that constraining the Perl 6 STD language to back compat with Perl 5 syntax and semantics would have been a big mistake and a big missed opportunity. The end result is still much more friendly to the average Perl 5 user than, say, lisp, haskell, or scala.

you can access them as $/[0], $/1, ... (hey, wasn't we supposed to use @ for arrays. Oh, right, this is an object, you just index it as if it was an array, but ...)

You can use @ for arrays in the STD language of Perl 6, but you don't have to:

my $array; $array[3] = True; my @array; @array[3] = True;

... and there are shortcuts in the form $0, $1, $2, ... WHAT?!? Yeah, the sortcuts start with $0!

I agree this sounds particularly disturbing. In practice it doesn't trip folk up. Note that you can do this:

say "bar" ~~ /$1=(\w)(\w)(\w)/; say $2; # a

The more I know about Perl6, the more I hope it's gonna disappear almost without a trace as a failed experiment.

The community is sustainable, vibrant, and growing. The contributor base, family of languages, Rakudo compiler, Rakudo debugger, toolchain, modules, doc, and intrastructure are all maturing nicely. The team has figured out the path to speeding Rakudo up by orders of magnitude. Larry's writing a Camel equivalent. There's still $100k left of the Hague grant. Sorry, but it ain't going away. :)

Perl 6 is already attracting curious hackers that have never touched Perl 5 and will I predict begin to attract Perl 5 users next year that want to be able to write in a Perl (5ish or 6ish) on new platforms (eg android via the jvm or browsers via javascript), and/or use new capabilities (eg automatic parallelizing) and/or gain expressivity (grammars, lispish macros, etc.). You are free to ignore it but I'm confident it is here to stay and is inevitably going to help usefully address many of the long standing problems Perl 5 has.


In reply to Re^2: Perl 6 <-> Perl 5 bridges (was Re^2: Capturing parenthesis and grouping square brackets) by raiph
in thread Capturing parenthesis and grouping square brackets by Eily

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.