in reply to Re^4: Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
in thread Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
Open this and then call the block for every line of the resulting file handle, closing the file at the end.
Ok, I see. How about this one?
This seems to work and it is semantically much closer to what you proposed: it opens the file, calls print (which is not a block, but I think, it could be made one for no good) for each requested line.(=<>)[0..9].print
It is an interesting question, whether we could omit the parentheses around =<>. Although Pugs does not seem to like it, I am not entirely sure that [] should bind so tight.
rg0now
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
by nothingmuch (Priest) on Mar 30, 2005 at 16:00 UTC | |
by TimToady (Parson) on Mar 30, 2005 at 16:50 UTC | |
by rg0now (Chaplain) on Mar 31, 2005 at 22:18 UTC |
In Section
Meditations