Perl6 knows no __DATA__ construct. One can however, use the =finish pod marker and the $=finish variable for similar effect.
use v6; say $=finish; # says "foo" =finish foo
Edit: Renamed as per advice


holli

You can lead your users to water, but alas, you cannot drown them.

Replies are listed 'Best First'.
Re: Small Perl 6 discoveries I, __DATA__
by jahero (Pilgrim) on Sep 29, 2017 at 07:47 UTC

    I believe that might not be accurate. See this (disclaimer: untested) https://design.perl6.org/S26.html#Data_blocks

    Rats. Should have tried it first.

    ===SORRY!=== Error while compiling c:\temp/test.p6 Pod variable $=data not yet implemented. Sorry. at c:\temp/test.p6:8 ------> say $=data<HERE><Virtues>;

      It says right across the top of the page you linked:
      Note: these documents may be out of date. For Perl 6 documentation see docs.perl6.org; for specs, see the official test suite.
      I'm going to have to point out that docs.perl6.org is not always correct either, and let the significance of the last phrase sink in. The test suite is constantly tweaked to match the behavior of the latest perl6 code, so effectively the only specification for Perl6 is perl6 (caps intentional).
        The test suite is constantly tweaked to match the behavior of the latest perl6 code

        Are you including new tests that land corresponding to bug fixes that land? (Which is to say, most of the changes to the test suite.) Or just removals and corrections of bad tests?

          A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.