Rod Adams <[EMAIL PROTECTED]> wrote:
> Larry Wall wrote:
> > On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote:
> >
> > : 2) Documentation.
> > :Where is the slurp built-in documented? I couldn't find it
> > :in any of the Synopses (including Rod Adams' recent S29).
> > :In
Larry Wall wrote:
On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote:
: 2) Documentation.
:Where is the slurp built-in documented? I couldn't find it
:in any of the Synopses (including Rod Adams' recent S29).
:In desperation, I googled and found CPAN Perl6::Slurp.
The officia
Larry Wall wrote:
On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote:
: 2) Documentation.
:Where is the slurp built-in documented? I couldn't find it
:in any of the Synopses (including Rod Adams' recent S29).
:In desperation, I googled and found CPAN Perl6::Slurp.
The officia
On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote:
: --- Autrijus Tang wrote:
: > On Fri, Mar 18, 2005 at 09:35:59PM +1100, Andrew Savige wrote:
: > > What is the best way in Perl6/Pugs to slurp a file?
: >
: > You use the slurp() primitive, implemented as r875. :)
:
: Thanks. I teste
--- Autrijus Tang wrote:
> On Fri, Mar 18, 2005 at 09:35:59PM +1100, Andrew Savige wrote:
> > What is the best way in Perl6/Pugs to slurp a file?
>
> You use the slurp() primitive, implemented as r875. :)
Thanks. I tested these two forms and it's truly lovely:
my $x = slurp($fname) err die("slur
On Fri, Mar 18, 2005 at 09:35:59PM +1100, Andrew Savige wrote:
> What is the best way in Perl6/Pugs to slurp a file?
You use the slurp() primitive, implemented as r875. :)
Thanks,
/Autrijus/
pgpRvJPSFij0S.pgp
Description: PGP signature
>From S04:
It is possible to write
while =$*IN -> $line {...}
But it won't do what you expect, because unary = does a slurp in
scalar context, so $line will contain the entire file.
So I expected this function to slurp the whol