On Fri, Jan 18, 2002 at 08:03:41PM -0800, Larry Wall wrote:
> : allow this:
> :
> : File.foreach('/usr/dict/words') { print }
>
> File.foreach('/usr/dict/words', { print })
>
> or even (presuming the prototype is available for parsing):
>
> File.foreach '/usr/dict/words' { print }
Larry Wall <[EMAIL PROTECTED]> writes:
> Michael G Schwern writes:
> : Reading this in Apoc 4
> :
> : sub mywhile ($keyword, &condition, &block) {
> : my $l = $keyword.label;
> : while (&condition()) {
> : &block();
> : CATCH {
> : my $
Piers Cawley writes:
: Hmm... making up some syntax on the fly. I sort of like the idea of
: being able to do
:
: class File;
: sub foreach ($file, &block) is Control {
: # 'is Control' declares this as a control sub, which, amongst
: # other things 'hides' itself from cal
Michael G Schwern writes:
: Reading this in Apoc 4
:
: sub mywhile ($keyword, &condition, &block) {
: my $l = $keyword.label;
: while (&condition()) {
: &block();
: CATCH {
: my $t = $!.tag;
: when X::Control::next { die
Dan Sugalski <[EMAIL PROTECTED]> writes:
> At 3:37 PM + 1/18/02, Piers Cawley wrote:
>>Michael G Schwern <[EMAIL PROTECTED]> writes:
>>
>>Hmm... making up some syntax on the fly. I sort of like the idea of
>>being able to do
>>
>> class File;
>> sub foreach ($file, &block) is Control {
At 3:37 PM + 1/18/02, Piers Cawley wrote:
>Michael G Schwern <[EMAIL PROTECTED]> writes:
>
>Hmm... making up some syntax on the fly. I sort of like the idea of
>being able to do
>
> class File;
> sub foreach ($file, &block) is Control {
> # 'is Control' declares this as a contr
Michael G Schwern <[EMAIL PROTECTED]> writes:
> Reading this in Apoc 4
>
> sub mywhile ($keyword, &condition, &block) {
> my $l = $keyword.label;
> while (&condition()) {
> &block();
> CATCH {
> my $t = $!.tag;
> when X::
Reading this in Apoc 4
sub mywhile ($keyword, &condition, &block) {
my $l = $keyword.label;
while (&condition()) {
&block();
CATCH {
my $t = $!.tag;
when X::Control::next { die if $t && $t ne $l); next }
w