On Tue, Jul 31, 2001 at 04:00:44PM +0200,  Marc A. Lehmann  wrote:
> 
> The problem comes from the fact that scalars are passed by value (good
> idea usually), and perl implements this by copying (usually a good idea as
> well).

Oh, really?

    #!/opt/perl/bin/perl -w

    sub foo {$_ [0] ++}
    $_ = 1;
    foo $_;
    print;

    __END__
    2

Perl passes by reference, not value, as is documented in "man perlsub".



Abigail

Reply via email to