[Cologne-pm] Code-Review oder bin verwirrt

Wolfgang Weisselberg pl3rofb02 at sneakemail.com
Fri Jul 4 05:08:20 CDT 2003


Michael Lamertz mike-at-lamertz.net |Perl Users Cologne/Allow| wrote 50 lines:

> > > sub GetFormInput {
> > >     (*fval) = @_ if @_ ;

> Das ist genau das Konstrukt das Wolfgang (?) beim ersten Treffen als
> Call-By-Reference fuer Arrays vorgeschlagen hatte.

Nein.

Ich hatte 

    sub x(\@\@);

    @array = (1,2,3);
    @other_array = ('A', 'B', 'C');

    x(@array, @other_array);

    sub x(\@\@) {
        my ($array_ref, $other_array_ref) = @_;
        print join (", ", @$array_ref), "\n";
        print join (", ", @$other_array_ref), "\n";
    }

vorgeschlagen (man beachte die Prototypen).  Was natuerlich krank
ist.

-Wolfgang



More information about the Cologne-pm mailing list