in reply to Re: returning arrays from a sub - how clever is Perl?
in thread returning arrays from a sub - how clever is Perl?
sub test_with { my @testary = with_want(); my $testscalar = with_want(); } sub test_without { my @testary = with_want(); my $testscalar = with_want(); }
I'd expect the results to be similar, since you're testing the exact same thing! I think you want that second one to be:
sub test_without { my @testary = without(); my $testscalar = without(); }
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
|
|---|