From: "Florian Groß" Date: 2005-08-07T05:27:14+09:00 Subject: Re: new block notation (was: Re: ruby-dev summary 26468-26661) David A. Black wrote: >> Of course there is also Perl's sub. > > sub predates Perl considerably :-) But I don't think subroutine is a > good OO concept. But I think Perl is the first language to use it for closures: sub my_times { my $count = shift; my $fun = shift; for my $i (1 .. $count) { $fun->($i); } } my_times(5, sub { my $i = shift; print($i, "\n"); }); Output: 1 2 3 4 5 Sure, it stood for subroutine originally, but I guess it doesn't matter much.