Juerd <[EMAIL PROTECTED]> wrote:
> := is the thing that implements subroutine arguments. Ask yourself the
> same question with:
>
> sub another_routine ($rv) {
> ...
> }
> another_routine(some_routine());
>
> I'd expect $rv to be an alias to a copy of $foo's value, 42.
Really?
On Tue, 2005-05-10 at 15:52, Joshua Gatcomb wrote:
> I am wondering what the proper behavior of binding to a sub's return
> value should be
>
> sub some_routine {
> my $foo = 42;
> return $foo;
> }
> my $rv := some_routine();
>
> Should $rv be bound t
Joshua Gatcomb skribis 2005-05-10 15:52 (-0400):
> sub some_routine {
> my $foo = 42;
> return $foo;
> }
> my $rv := some_routine();
> Should $rv be bound to $foo or to a copy of $foo? I ask because with
> state() and closures, it makes a difference since the value can
> change.
:= is the
I am wondering what the proper behavior of binding to a sub's return
value should be
sub some_routine {
my $foo = 42;
return $foo;
}
my $rv := some_routine();
Should $rv be bound to $foo or to a copy of $foo? I ask because with
state() and closures, it makes a difference since the