sub w (\&@) { while (&{$_[0]}()) { &{$_[1]}() } } sub d (\&) { $_[0]; } # then, instead of while (foo) { bar }, you can say w{foo}d{bar};