Hi Marcos.
First let's remove some fog from your code. Your anonymous subroutine
sub {$_ = 5;}
is returning the value '5' because that's the value of the assignment
operator '='. The assigment to $_ is serving no useful purpose as
$_ isn't used anywhere else. So we can reduce this to
sub {
On Tue, Dec 09, 2003 at 09:14:52AM +0100 [EMAIL PROTECTED] wrote:
> I would like to read something about passing code inside function. Lets say
> that:
>
> This works:
> perl -e 'sub a(&){print(&{$_[0]}, "/n"};$_=0; a {$_++} foreach 1..100'
>
&
t: Re: passing code inside function
On Dec 9, 2003, at 12:14 AM, [EMAIL PROTECTED] wrote:
> I would like to read something about passing code inside function.
> Lets say
> that:
>
> This works:
> perl -e 'sub a(&){print(&{$_[0]}, "/n"};$_=0; a {$_++} foreach
On Dec 9, 2003, at 12:14 AM, [EMAIL PROTECTED] wrote:
I would like to read something about passing code inside function.
Lets say
that:
This works:
perl -e 'sub a(&){print(&{$_[0]}, "/n"};$_=0; a {$_++} foreach 1..100'
what you might want to think about is trying
tha
I would like to read something about passing code inside function. Lets say
that:
This works:
perl -e 'sub a(&){print(&{$_[0]}, "/n"};$_=0; a {$_++} foreach 1..100'
This don't work
perl -e 'sub a{print(&{$_[0]}, "/n"};$_=0; a {$_++} foreach 1.