thundergnat has asked for the wisdom of the Perl Monks concerning the following question:
I've been playing around a bit with Rakudo * and haven't been able to figure out the syntax to use the DATA filehandle. I'm beginning to suspect that it hasn't been implemented yet.
Google yielded meager results; the most promising was the preliminary "Learning Perl6" book by merlyn and brian_d_foy. It was written in 2007 however, based on pugs, and syntax has drifted since then.
I checked the Rakudo test suite to see if I could find a test using a DATA fh but didn't turn up anything.
Anyone have any pointers to documentation about this? (Even documentation saying "It isn't implemented yet."?)
From "Learning Perl6": (Doesn't work in Rakudo *)
for =$=DATA { .say } =begin DATA 1 2 3 4 5 =end
Returns:
===SORRY!=== Non-declarative sigil is missing its name at line 3, near "$=DATA {\n +"
I tried some different things but started hearing dominus commenting in my head so figured I would be better off asking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rakudo * DATA filehandle syntax
by moritz (Cardinal) on Aug 11, 2010 at 16:47 UTC | |
|
Re: Rakudo * DATA filehandle syntax
by molecules (Monk) on Aug 11, 2010 at 16:44 UTC |